XOOPS
2.6.0
|
Public Member Functions | |
__construct () | |
copyFileAssets ($from_path, $pattern, $output) | |
getUrlToAssets ($type, $assets, $filters= 'default', $target=null) | |
registerAssetReference ($name, $assets, $filters=null) | |
setDebug ($debug) | |
Protected Member Functions | |
readAssetsPrefs () | |
saveAssetsPrefs ($assets_prefs) | |
Private Attributes | |
$assetManager = null | |
$assetsPrefsCacheKey = 'system/assets/prefs' | |
$assetsPrefsFilename = 'var/configs/system_assets_prefs.yml' | |
$debug = false | |
$default_asset_refs | |
$default_filters | |
$default_output | |
$filterInterface = '\Assetic\Filter\FilterInterface' | |
Definition at line 36 of file Assets.php.
Xoops\Core\Assets::__construct | ( | ) |
__construct
Definition at line 105 of file Assets.php.
References Xoops\Core\Assets\readAssetsPrefs(), Xoops\Core\Assets\registerAssetReference(), and Xoops\Core\Assets\setDebug().
Xoops\Core\Assets::copyFileAssets | ( | $from_path, | |
$pattern, | |||
$output | |||
) |
copyFileAssets - copy files to the appropriate asset directory.
Copying is normally only needed for fonts or images when they are referenced by a relative url in stylesheet, or are located outside of the web root.
string | $from_path | path to files to copy |
string | $pattern | glob pattern to match files to be copied |
string | $output | output type (css, fonts, images, js) |
Definition at line 431 of file Assets.php.
References $count, $oldUmask, $status, $xoops, and Xoops\getInstance().
Xoops\Core\Assets::getUrlToAssets | ( | $type, | |
$assets, | |||
$filters = 'default' , |
|||
$target = null |
|||
) |
getUrlToAssets
Create an asset file from a list of assets
string | $type | type of asset, css or js |
array | $assets | list of source files to process |
string | array | $filters | either a comma separated list of known namsed filters or an array of named filters and/or filter object |
string | $target | target path, will default to assets directory |
Definition at line 202 of file Assets.php.
References Xoops\Core\Assets\$assetManager, $filter, $target, $type, $xoops, and Xoops\getInstance().
|
protected |
readAssetsPrefs - read configured asset preferences
Definition at line 123 of file Assets.php.
References $file, $mtime, $xoops, Xoops\getInstance(), Xoops\Core\Yaml\read(), and Xoops\Core\Assets\saveAssetsPrefs().
Referenced by Xoops\Core\Assets\__construct().
Xoops\Core\Assets::registerAssetReference | ( | $name, | |
$assets, | |||
$filters = null |
|||
) |
Add an asset reference to the asset manager
string | $name | the name of the reference to be added |
mixed | $assets | a string asset path, or an array of asset paths, may include wildcard |
string | array | $filters | either a comma separated list of known named filters or an array of named filters and/or filter object |
Definition at line 344 of file Assets.php.
References $filter, $name, $xoops, and Xoops\getInstance().
Referenced by Xoops\Core\Assets\__construct().
|
protected |
saveAssetsPrefs - record array of assets preferences in config file, and update cache
array | $assets_prefs | array of asset preferences to save |
Definition at line 175 of file Assets.php.
References $xoops, Xoops\getInstance(), and Xoops\Core\Yaml\save().
Referenced by Xoops\Core\Assets\readAssetsPrefs().
Xoops\Core\Assets::setDebug | ( | $debug | ) |
setDebug enable debug mode, will skip filters prefixed with '?'
boolean | $debug | true to enable debug mode |
Definition at line 328 of file Assets.php.
References Xoops\Core\Assets\$debug.
Referenced by Xoops\Core\Assets\__construct().
|
private |
Definition at line 83 of file Assets.php.
Referenced by Xoops\Core\Assets\getUrlToAssets().
|
private |
Definition at line 93 of file Assets.php.
|
private |
Definition at line 88 of file Assets.php.
|
private |
Definition at line 41 of file Assets.php.
Referenced by Xoops\Core\Assets\setDebug().
|
private |
Definition at line 62 of file Assets.php.
|
private |
Definition at line 46 of file Assets.php.
|
private |
Definition at line 54 of file Assets.php.
|
private |
Definition at line 99 of file Assets.php.