Search for addClass

  1. Search 7.x for addClass
  2. Search 9.5.x for addClass
  3. Search 8.9.x for addClass
  4. Search 10.3.x for addClass
  5. Other projects
Title Object type File name Summary
Attribute::addClass function core/lib/Drupal/Core/Template/Attribute.php Adds classes or merges them on to array of existing CSS classes.
AttributeTest::testAddClasses function core/tests/Drupal/Tests/Core/Template/AttributeTest.php Tests adding class attributes with the AttributeArray helper method.
@covers ::addClass
TwigExtension::addClass function core/lib/Drupal/Core/Template/TwigExtension.php Adds a value into the class attributes of a given element.
TwigExtensionTest::providerTestTwigAddClass function core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php Provides data for ::testTwigAddClass().
TwigExtensionTest::testTwigAddClass function core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php Tests Twig 'add_class' filter.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.