You are here

public function DrupalAttributes::removeClass in Express 8

Removes a class from an attributes object.

This is a wrapper method to retrieve the correct attributes storage object and then remove the class(es) from it.

Parameters

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

string $type: (optional) The type of attributes to use for this method.

Return value

$this

See also

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

File

themes/contrib/bootstrap/src/Utility/DrupalAttributes.php, line 282
Contains \Drupal\bootstrap\Utility\DrupalAttributes.

Class

DrupalAttributes
Class for managing multiple types of attributes commonly found in Drupal.

Namespace

Drupal\bootstrap\Utility

Code

public function removeClass($class, $type = DrupalAttributes::ATTRIBUTES) {
  $this
    ->getAttributes($type)
    ->removeClass($class);
  return $this;
}