VuFind API Documentation

AbstractCssPreCompiler
in package

Abstract base class to precompile CSS within a theme.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

$basePath  : string
Base path of VuFind.
$fakePath  : string
Fake base path used for generating absolute paths in CSS.
$output  : OutputInterface
Output object (set for logging)
$tempPath  : string
Temporary directory for cached files.
$themeConfigKey  : string
Key in theme.config.php that lists all files
__construct()  : mixed
Constructor
compile()  : void
Compile the scripts.
setBasePath()  : void
Set base path
setTempPath()  : void
Set temporary directory
getAllFiles()  : array<string|int, mixed>
Get all less files that might exist in a theme.
getAllThemes()  : array<string|int, mixed>
Get a list of all available themes.
logMessage()  : void
Log a message to the console
makeRelative()  : string
Convert fake absolute paths to working relative paths.
processTheme()  : void
Compile scripts for the specified theme.

Properties

$fakePath

Fake base path used for generating absolute paths in CSS.

protected string $fakePath = '/zzzz_basepath_zzzz/'

Methods

__construct()

Constructor

public __construct([OutputInterface $output = null ]) : mixed
Parameters
$output : OutputInterface = null

Output interface for logging (optional)

Return values
mixed

compile()

Compile the scripts.

public compile(array<string|int, mixed> $themes) : void
Parameters
$themes : array<string|int, mixed>

Array of themes to process (empty for ALL themes).

Return values
void

setBasePath()

Set base path

public setBasePath(string $path) : void
Parameters
$path : string

Path to set

Return values
void

setTempPath()

Set temporary directory

public setTempPath(string $path) : void
Parameters
$path : string

Path to set

Return values
void

getAllFiles()

Get all less files that might exist in a theme.

protected getAllFiles(string $theme) : array<string|int, mixed>
Parameters
$theme : string

Theme to retrieve files from

Return values
array<string|int, mixed>

getAllThemes()

Get a list of all available themes.

protected getAllThemes() : array<string|int, mixed>
Return values
array<string|int, mixed>

logMessage()

Log a message to the console

protected logMessage(string $str) : void
Parameters
$str : string

message string

Return values
void

makeRelative()

Convert fake absolute paths to working relative paths.

protected makeRelative(string $css, string $less) : string
Parameters
$css : string

Generated CSS

$less : string

Relative LESS filename

Tags
SuppressWarnings

(PHPMD.UnusedLocalVariable)

Return values
string

processTheme()

Compile scripts for the specified theme.

protected abstract processTheme(string $theme) : void
Parameters
$theme : string

Theme name

Return values
void

Search results