W3cubDocs

/Drupal 8

trait ToStringTrait

Wraps __toString in a trait to avoid some fatals.

Hierarchy

File

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

Namespace

Drupal\Component\Utility

Members

Name Modifiers Type Description
ToStringTrait::render abstract public function Renders the object as a string.
ToStringTrait::_die protected function For test purposes, wrap die() in an overridable method.
ToStringTrait::__toString public function Implements the magic __toString() method.

© 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!Component!Utility!ToStringTrait.php/trait/ToStringTrait/8.1.x