function EntityReference::getTargetDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php \Drupal\Core\Entity\Plugin\DataType\EntityReference::getTargetDefinition()
  2. 8.9.x core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php \Drupal\Core\Entity\Plugin\DataType\EntityReference::getTargetDefinition()
  3. 10 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php \Drupal\Core\Entity\Plugin\DataType\EntityReference::getTargetDefinition()

Gets the definition of the referenced entity.

Return value

\Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface The reference target's definition.

File

core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php, line 51

Class

EntityReference
Defines an 'entity_reference' data type.

Namespace

Drupal\Core\Entity\Plugin\DataType

Code

public function getTargetDefinition() {
    return $this->definition
        ->getTargetDefinition();
}

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