protected function EntityWrapper::getIdSource

Helper to get the typed data object holding the source entity ID.

Return value

\Drupal\Core\TypedData\TypedDataInterface|FALSE

2 calls to EntityWrapper::getIdSource()
EntityWrapper::getValue in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php
Implements TypedDataInterface::getValue().
EntityWrapper::setValue in drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php
Implements TypedDataInterface::setValue().

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php, line 91
Definition of Drupal\Core\Entity\Field\Type\EntityWrapper.

Class

EntityWrapper
Defines an 'entity' data type, e.g. the computed 'entity' property of entity references.

Namespace

Drupal\Core\Entity\Field\Type

Code

protected function getIdSource() {
  return !empty($this->definition['settings']['id source']) ? $this->parent
    ->get($this->definition['settings']['id source']) : FALSE;
}