\Kaloa\ViewAssetManager

Helper class to add CSS/JS assets to an HTML document.

Summary

Methods
Properties
Constants
__construct()
addJavaScript()
addStylesheet()
generate()
No public properties found
No constants found
wrapWithConditionalComment()
$assets
N/A
No private methods found
No private properties found
N/A

Properties

$assets

$assets : array

Type

array — List of assets.

Methods

__construct()

__construct() 

Initializes the instance.

addJavaScript()

addJavaScript(string  $path) 

Adds a path to a JavaScript file to the managed assets.

Parameters

string $path

Path to JavaScript file.

addStylesheet()

addStylesheet(string  $path) 

Adds a path to a CSS file to the managed assets.

Parameters

string $path

Path to CSS file.

generate()

generate() : \Kaloa\View\Generated

Generates HTML output.

Returns

\Kaloa\View\Generated —

HTML output.

wrapWithConditionalComment()

wrapWithConditionalComment(string  $string, string  $condition) : string

Wraps an IE conditional comment around a string.

Parameters

string $string
string $condition

Returns

string