Property | Type | Description | |
---|---|---|---|
$helpers | array | Helpers used. |
Property | Type | Description | |
---|---|---|---|
$collection | AssetCollection for the current config set. | ||
$config | Configuration object | ||
$factory | Factory for other AssetCompress objects. | ||
$writer | AssetWriter instance |
Method | Description | |
---|---|---|
__construct ( Cake\View\View $view, array $settings = [] ) : void | Constructor - finds and parses the ini file the plugin uses. | |
assetConfig ( |
Modify the runtime configuration of the helper. | |
css ( string $file, array $options = [] ) : string | Create a CSS file. Will generate link tags for either the dynamic build controller, or the generated file if it exists. | |
exists ( string $file ) : boolean | Check if a build exists (is defined and have at least one file) in the ini file. | |
inlineCss ( string $file ) : string | Create a CSS file. Will generate inline style tags in production, or reference the dynamic build file in development | |
inlineScript ( string $file ) : string | Create an inline script tag for a script asset. Will generate inline script tags in production, or reference the dynamic build file in development. | |
script ( string $file, array $options = [] ) : A | Create a script tag for a script asset. Will generate script tags for either the dynamic build controller, or the generated file if it exists. | |
url ( string $file = null, boolean | array $full = false ) : string | Get the URL for a given asset name. |
Method | Description | |
---|---|---|
_addExt ( string $file, string $ext ) : string | Adds an extension if the file doesn't already end with it. | |
_getBuildName ( |
Get the build file name. | |
_getRoute ( |
Get the dynamic build path for an asset. | |
_relativizePath ( string $path ) : string | Converts an absolute path into a web relative one. | |
collection ( ) : |
Get the AssetCollection | |
factory ( ) : |
Get the AssetCompress factory based on the config object. | |
writer ( ) : |
Get the AssetWriter |
public __construct ( Cake\View\View $view, array $settings = [] ) : void | ||
$view | Cake\View\View | The view instance to use. |
$settings | array | The settings for the helper. |
return | void |
protected _getBuildName ( |
||
$build | The build being resolved. | |
return | string | The resolved build name. |
protected _relativizePath ( string $path ) : string | ||
$path | string | The path to convert |
return | string | A webroot relative string. |
public assetConfig ( |
||
$config | The config instance to set. | |
return | Either the current config object or null. |
protected collection ( ) : |
||
return |
protected factory ( ) : |
||
return |
public inlineScript ( string $file ) : string | ||
$file | string | A build target to include. |
return | string | script tag |
protected writer ( ) : |
||
return |
protected AssetCollection,MiniAsset $collection | ||
return |
protected AssetConfig,MiniAsset $config | ||
return |
protected Factory,AssetCompress $factory | ||
return |