Gets or sets options for various asset types.
public static assets ( string $type = null, array $options = [] ) : array | ||
$type | string | The name of the asset type, i.e. `'js'` or `'css'`. |
$options | array | If registering a new asset type or modifying an existing asset type, contains settings for the asset type, where the available keys are as follows: - `'suffix'`: The standard suffix for this content type, with leading dot ('.') if applicable. - `'filter'`: An array of key/value pairs representing simple string replacements to be done on a path once it is generated. - `'paths'`: An array of key/value pairs where the keys are `String::insert()` compatible paths, and the values are array lists of keys to be inserted into the path string. |
Résultat | array | If `$type` is empty, an associative array of all registered types and all associated options is returned. If `$type` is a string and `$options` is empty, returns an associative array with the options for `$type`. If `$type` and `$options` are both non-empty, returns `null`. |