function _bootstrap_remove_class

8 deprecated.php _bootstrap_remove_class($class, array &$element, $property = 'attributes')
7 common.inc _bootstrap_remove_class($class, &$element, $property = 'attributes')

Removes a class from an element's attributes array.

  // Before.
  _bootstrap_remove_class('my-class', $element);

  // After.
  use Drupal\bootstrap\Utility\Element;
  Element::create($element)->removeClass('my-class');

Parameters

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

array $element: The individual renderable array element.

string $property: Determines which attributes array to retrieve. By default, this is the element's normal "attributes", but it could also be one of the following:

  • "content_attributes"
  • "input_group_attributes"
  • "title_attributes"
  • "wrapper_attributes".

Deprecated

Will be removed in a future release.

See Also

  • \Drupal\bootstrap\Utility\Element::removeClass()

Source ./deprecated.php (line 574)

function _bootstrap_remove_class($class, array &$element, $property = 'attributes') {
  Bootstrap::deprecated();
  Element::create($element)->removeClass($class, $property);
}