function DataReferenceBase::getString

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/DataReferenceBase.php \Drupal\Core\TypedData\DataReferenceBase::getString()
  2. 10 core/lib/Drupal/Core/TypedData/DataReferenceBase.php \Drupal\Core\TypedData\DataReferenceBase::getString()
  3. 11.x core/lib/Drupal/Core/TypedData/DataReferenceBase.php \Drupal\Core\TypedData\DataReferenceBase::getString()

Overrides TypedData::getString

1 method overrides DataReferenceBase::getString()
EntityReference::getString in core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php
Returns a string representation of the data.

File

core/lib/Drupal/Core/TypedData/DataReferenceBase.php, line 56

Class

DataReferenceBase
Base class for typed data references.

Namespace

Drupal\Core\TypedData

Code

public function getString() {
    return (string) $this->getType() . ':' . $this->getTargetIdentifier();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.