Search for setAttribute

  1. Search 7.x for setAttribute
  2. Search 9.5.x for setAttribute
  3. Search 10.3.x for setAttribute
  4. Search 11.x for setAttribute
  5. Other projects
Title Object type File name Summary
Attribute::setAttribute function core/lib/Drupal/Core/Template/Attribute.php Sets values for an attribute key.
AttributeTest::testSetAttribute function core/tests/Drupal/Tests/Core/Template/AttributeTest.php Tests setting attributes.
@covers ::setAttribute
Element::setAttributes function core/lib/Drupal/Core/Render/Element.php Sets HTML attributes based on element properties.
ElementInterface::setAttributes function core/lib/Drupal/Core/Render/Element/ElementInterface.php Sets a form element's class attribute.
ElementTest::providerTestSetAttributes function core/tests/Drupal/Tests/Core/Render/ElementTest.php Data provider for testSetAttributes().
ElementTest::testSetAttributes function core/tests/Drupal/Tests/Core/Render/ElementTest.php Tests the setAttributes() method.
RenderElement::setAttributes function core/lib/Drupal/Core/Render/Element/RenderElement.php Sets a form element's class attribute.

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