You are here

public function Attributes::addClass in Express 8

Add class(es) to the array.

Parameters

string|array $class: An individual class or an array of classes to add.

See also

\Drupal\bootstrap\Utility\Attributes::getClasses()

File

themes/contrib/bootstrap/src/Utility/Attributes.php, line 31
Contains \Drupal\bootstrap\Utility\Attributes.

Class

Attributes
Class to help modify attributes.

Namespace

Drupal\bootstrap\Utility

Code

public function addClass($class) {
  $classes =& $this
    ->getClasses();
  $classes = array_unique(array_merge($classes, (array) $class));
}