You are here

protected function EntityReferenceHandlerBase::loadReferencedEntity in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Plugin/EntityReferenceHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityReferenceHandlerBase::loadReferencedEntity()
  2. 2.0.x src/Plugin/EntityReferenceHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityReferenceHandlerBase::loadReferencedEntity()

Load the entity that is either referenced or embedded by $definition.

Parameters

$definition:

Return value

\Drupal\Core\Entity\EntityInterface

Throws

\Drupal\Component\Plugin\Exception\PluginNotFoundException

\Drupal\Core\Entity\EntityStorageException

\Drupal\cms_content_sync\Exception\SyncException

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

2 calls to EntityReferenceHandlerBase::loadReferencedEntity()
DefaultFieldCollectionHandler::loadReferencedEntity in src/Plugin/cms_content_sync/field_handler/DefaultFieldCollectionHandler.php
Load the entity that is either referenced or embedded by $definition.
EntityReferenceHandlerBase::setValues in src/Plugin/EntityReferenceHandlerBase.php
2 methods override EntityReferenceHandlerBase::loadReferencedEntity()
DefaultFieldCollectionHandler::loadReferencedEntity in src/Plugin/cms_content_sync/field_handler/DefaultFieldCollectionHandler.php
Load the entity that is either referenced or embedded by $definition.
DefaultUserReferenceHandler::loadReferencedEntity in src/Plugin/cms_content_sync/field_handler/DefaultUserReferenceHandler.php
Load the entity that is either referenced or embedded by $definition.

File

src/Plugin/EntityReferenceHandlerBase.php, line 381

Class

EntityReferenceHandlerBase
Providing a base implementation for any reference field type.

Namespace

Drupal\cms_content_sync\Plugin

Code

protected function loadReferencedEntity(PullIntent $intent, $definition) {
  return $intent
    ->loadEmbeddedEntity($definition);
}