function _bootstrap_remove_class
8.x-3.x deprecated.php | _bootstrap_remove_class($class, array &$element, $property = 'attributes') |
7.x-3.x common.inc | _bootstrap_remove_class($class, array &$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.
Source ./deprecated.php (line 630)
function _bootstrap_remove_class($class, array &$element, $property = 'attributes') {
Bootstrap::deprecated();
Element::create($element)->removeClass($class, $property);
}