Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AttributeBoolean.php

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

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal