addCssClass() public static method
Adds a CSS class (or several classes) to the specified options.
If the CSS class is already in the options, it will not be added again. If class specification at given options is an array, and some class placed there with the named (string) key, overriding of such key will have no effect. For example:
$options = ['class' => ['persistent' => 'initial']]; Html::addCssClass($options, ['persistent' => 'override']); var_dump($options['class']); // outputs: array('persistent' => 'initial');
public static void addCssClass ( &$options, $class ) | ||
---|---|---|
$options | array |
The options to be modified. |
$class | string|array |
The CSS class(es) to be added |
Please login to continue.