You are here

public function TypedData::getString in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/TypedData/TypedData.php \Drupal\Core\TypedData\TypedData::getString()

Returns a string representation of the data.

Return value

string

Overrides TypedDataInterface::getString

1 call to TypedData::getString()
StringData::getCastedValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php
Gets the primitive data value casted to the correct PHP type.
6 methods override TypedData::getString()
BinaryData::getString in core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
Returns a string representation of the data.
DataReferenceBase::getString in core/lib/Drupal/Core/TypedData/DataReferenceBase.php
Returns a string representation of the data.
EntityAdapter::getString in core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php
Returns a string representation of the data.
ItemList::getString in core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php
Returns a string representation of the data.
Language::getString in core/lib/Drupal/Core/TypedData/Plugin/DataType/Language.php
Returns a string representation of the data.

... See full list

File

core/lib/Drupal/Core/TypedData/TypedData.php, line 120
Contains \Drupal\Core\TypedData\TypedData.

Class

TypedData
The abstract base class for typed data.

Namespace

Drupal\Core\TypedData

Code

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