public function AttributeBoolean::__toString

public AttributeBoolean::__toString()

Implements the magic __toString() method.

Overrides AttributeValueBase::__toString

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\Template

Code

public function __toString() {
  return $this->value === FALSE ? '' : Html::escape($this->name);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!AttributeBoolean.php/function/AttributeBoolean::__toString/8.1.x