helpers\BaseHtml addCssClass()

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

doc_Yii
2016-10-30 17:04:57
Comments
Leave a Comment

Please login to continue.