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

Breadcrumb

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

function ToStringTrait::render

Renders the object as a string.

Return value

string|object The rendered string or an object implementing __toString().

1 call to ToStringTrait::render()
ToStringTrait::__toString in core/lib/Drupal/Component/Utility/ToStringTrait.php
Implements the magic __toString() method.
2 methods override ToStringTrait::render()
DateTimePlus::render in core/lib/Drupal/Component/Datetime/DateTimePlus.php
Renders the timezone name.
TranslatableMarkup::render in core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php
Renders the object as a string.

File

core/lib/Drupal/Component/Utility/ToStringTrait.php, line 41

Class

ToStringTrait
Wraps __toString in a trait to avoid some fatal errors.

Namespace

Drupal\Component\Utility

Code

public abstract function render();

API Navigation

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