function AttributeBoolean::__toString
Same name in other branches
- 9 core/lib/Drupal/Core/Template/AttributeBoolean.php \Drupal\Core\Template\AttributeBoolean::__toString()
- 10 core/lib/Drupal/Core/Template/AttributeBoolean.php \Drupal\Core\Template\AttributeBoolean::__toString()
- 11.x core/lib/Drupal/Core/Template/AttributeBoolean.php \Drupal\Core\Template\AttributeBoolean::__toString()
Implements the magic __toString() method.
Overrides AttributeValueBase::__toString
1 call to AttributeBoolean::__toString()
- AttributeBoolean::render in core/
lib/ Drupal/ Core/ Template/ AttributeBoolean.php - Returns a string representation of the attribute.
File
-
core/
lib/ Drupal/ Core/ Template/ AttributeBoolean.php, line 39
Class
- AttributeBoolean
- A class that defines a type of boolean HTML attribute.
Namespace
Drupal\Core\TemplateCode
public function __toString() {
return $this->value === FALSE ? '' : Html::escape($this->name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.