W3cubDocs

/Drupal 8

public function TypedData::getString

public TypedData::getString()

Returns a string representation of the data.

Return value

string

Overrides TypedDataInterface::getString

File

core/lib/Drupal/Core/TypedData/TypedData.php, line 115

Class

TypedData
The abstract base class for typed data.

Namespace

Drupal\Core\TypedData

Code

public function getString() {
  return (string) $this->getValue();
}

© 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!TypedData!TypedData.php/function/TypedData::getString/8.1.x