class vB5_Template_Stylesheet

Properties

static protected $instance
protected $pending
protected $cssBundles
$ajaxCssLinks
protected array $previouslyIncluded List of CSS templates that have already been included on this page load and removed from $this->pending.

Methods

static 
instance()

No description

register($args)

No description

resetPending()

No description

insertCss(string $content, boolean $isAjaxTemplateRender)

Inserts s for CSS in the content

getAjaxCssLinks()

No description

getCssFile($filename)

No description

array
extractBlockTemplates(string $content)

Extracts CSS "block" classes (BEM) that are used in the passed markup, converts the classes to the corresponding CSS template, and returns the list of templates.

static 
extractBlockTemplatesExternal($content)

Wrapper for {see extractBlockTemplates}, only to be used in unit tests

registerBlockCssTemplates(string $content)

Registers block CSS templates for the block classes used in the markup This provides "autoload" functionality for block classes.

static array
getDebugLog()

Returns the CSS debugging information displayed in the footer.

Details

at line 26
static instance()

at line 37
register($args)

Parameters

$args

at line 42
resetPending()

at line 54
insertCss(string $content, boolean $isAjaxTemplateRender)

Inserts s for CSS in the content

Parameters

string $content The content
boolean $isAjaxTemplateRender true if we are rendering for a call to /ajax/render/ and we want CSS s separate

at line 276
getCssFile($filename)

Parameters

$filename

at line 407
protected array extractBlockTemplates(string $content)

Extracts CSS "block" classes (BEM) that are used in the passed markup, converts the classes to the corresponding CSS template, and returns the list of templates.

Parameters

string $content Markup

Return Value

array List of BEM block templates corresponding to the BEM classes that are used in the passed markup. Returns an empty array if no BEM classes are found.

at line 449
static extractBlockTemplatesExternal($content)

Wrapper for {see extractBlockTemplates}, only to be used in unit tests

Parameters

$content

at line 466
protected registerBlockCssTemplates(string $content)

Registers block CSS templates for the block classes used in the markup This provides "autoload" functionality for block classes.

Parameters

string $content Page HTML

at line 527
static array getDebugLog()

Returns the CSS debugging information displayed in the footer.

Return Value

array Array of debugging information