You are here

public function PushIntent::embed in CMS Content Sync 8

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

Push the provided entity along with the processed entity by embedding it right into the current entity. This means the embedded entity can't be used outside of it's parent entity in any way. This is used for field collections right now.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The referenced entity to push as well

array $details: {@see SyncIntent::getEmbedEntityDefinition}

Return value

array the definition you can store via {@see SyncIntent::setField} and on the other end receive via {@see SyncIntent::getField}

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

\Drupal\Core\Entity\EntityStorageException

\Drupal\cms_content_sync\Exception\SyncException

\GuzzleHttp\Exception\GuzzleException

1 call to PushIntent::embed()
PushIntent::addDependency in src/PushIntent.php
Push the provided entity as a dependency meaning the referenced entity is available before this entity so it can be referenced on the remote site immediately like bricks or paragraphs.

File

src/PushIntent.php, line 812

Class

PushIntent
Class PushIntent.

Namespace

Drupal\cms_content_sync

Code

public function embed($entity, $details = null) {
  return $this
    ->embedForFlowAndPool($entity, $details, $this->flow, $this->pool);
}