Свойство | Type | Description | |
---|---|---|---|
$action | |||
$allowedAreas | array | Allowed areas. | |
$area | string | The default area where to load assets. | |
$args | array | WordPress properties of an asset. | |
$filter | |||
$html | |||
$instances | array | A list of all Asset instances. | |
$instantiated | array | A list of enqueued assets. | |
$key | string | Asset key name. | |
$type | string | Type of the asset. |
Méthode | Description | |
---|---|---|
__construct ( string $type, array $args, Themosis\Hook\IHook $action, |
Build an Asset instance. | |
addAttributes ( array $atts ) : |
Add attributes to the asset opening tag. | |
getArea ( ) : string | Return the asset area. | |
getArgs ( string $name = '' ) : array | string | Return the asset properties. If $name isset, return its value. | |
getKey ( ) : string | Return the asset key. | |
getType ( ) : string | Return the asset type. | |
inline ( string $data, string $position = 'after' ) : |
Add inline code before or after the loaded asset. | |
install ( ) | Install the appropriate asset depending of its area. | |
isQueued ( ) : boolean | Tells if an asset is queued or not. | |
localize ( string $objectName, mixed $data ) : |
Localize data for the linked asset. | |
remove ( ) : |
Remove a declared asset. | |
to ( string $area ) : |
Allow the developer to define where to load the asset. |
Méthode | Description | |
---|---|---|
orderInstances ( ) | Manipulate the static::$instances variable in order to separate each asset in its area. | |
parse ( array $args ) : mixed | Parse defined asset properties. | |
parseMixed ( $mixed ) : string | boolean | Parse the mixed argument. | |
parseVersion ( string | boolean | null $version ) : mixed | Parse the version number. | |
register ( |
Register the asset. | |
registerInline ( |
Register inline code. | |
registerInstance ( ) | Register asset instances. | |
registerScript ( |
Register a 'script' asset. | |
registerStyle ( |
Register a 'style' asset. |
public __construct ( string $type, array $args, Themosis\Hook\IHook $action, |
||
$type | string | |
$args | array | |
$action | Themosis\Hook\IHook | |
$html | ||
$filter | Themosis\Hook\IHook |
public addAttributes ( array $atts ) : |
||
$atts | array | The asset attributes to add. |
Résultat |
protected orderInstances ( ) |
protected parseMixed ( $mixed ) : string | boolean | ||
$mixed | ||
Résultat | string | boolean |
protected registerInline ( |
||
$asset |
protected registerScript ( |
||
$asset |
protected registerStyle ( |
||
$asset |
protected ActionBuilder,Themosis\Hook $action | ||
Résultat |
protected string $area | ||
Résultat | string |
protected FilterBuilder,Themosis\Hook $filter | ||
Résultat |
protected HtmlBuilder,Themosis\Html $html | ||
Résultat |
protected static array $instances | ||
Résultat | array |
protected static array $instantiated | ||
Résultat | array |