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

Breadcrumb

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

function AttributeString::__toString

Implements the magic __toString() method.

Overrides AttributeValueBase::__toString

File

core/lib/Drupal/Core/Template/AttributeString.php, line 27

Class

AttributeString
A class that represents most standard HTML attributes.

Namespace

Drupal\Core\Template

Code

public function __toString() {
    return Html::escape((string) $this->value);
}

API Navigation

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