You are here

public function EntityStatus::setParentEntity in CMS Content Sync 8

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

If an entity is pushed or pulled embedded into another entity, we store that parent entity here. This is required so that at a later point we can still force pull and force push the embedded entity although it doesn't exist individually. This is also required to reset e.g. embedded paragraphs after the "Overwrite content locally" checkbox is unchecked.

Parameters

string $type:

string $uuid:

File

src/Entity/EntityStatus.php, line 832

Class

EntityStatus
Defines the "Content Sync - Entity Status" entity type.

Namespace

Drupal\cms_content_sync\Entity

Code

public function setParentEntity($type, $uuid) {
  $this
    ->setData(self::DATA_PARENT_ENTITY, [
    'type' => $type,
    'uuid' => $uuid,
  ]);
}