public function DrupalAttributes::removeAttribute in Express 8
Removes an attribute from an attributes object.
This is a wrapper method to retrieve the correct attributes storage object and then remove an attribute from it.
Parameters
string|array $name: The name of the attribute to remove.
string $type: (optional) The type of attributes to use for this method.
Return value
$this
See also
\Drupal\bootstrap\Utility\Attributes::removeAttribute()
File
- themes/
contrib/ bootstrap/ src/ Utility/ DrupalAttributes.php, line 262 - Contains \Drupal\bootstrap\Utility\DrupalAttributes.
Class
- DrupalAttributes
- Class for managing multiple types of attributes commonly found in Drupal.
Namespace
Drupal\bootstrap\UtilityCode
public function removeAttribute($name, $type = DrupalAttributes::ATTRIBUTES) {
$this
->getAttributes($type)
->removeAttribute($name);
return $this;
}