public function AttributeBoolean::__toString in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Template/AttributeBoolean.php \Drupal\Core\Template\AttributeBoolean::__toString()
- 9 core/lib/Drupal/Core/Template/AttributeBoolean.php \Drupal\Core\Template\AttributeBoolean::__toString()
Implements the magic __toString() method.
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);
}