You are here

protected function TaxonomyTermMatch::addDependency in Acquia Content Hub 8.2

Adds entity as dependency.

Parameters

\Drupal\acquia_contenthub\Event\LoadLocalEntityEvent $event: Data tamper event.

\Acquia\ContentHubClient\CDF\CDFObject $object: The CDF Object representing the remote entity.

\Drupal\Core\Entity\EntityInterface $entity: The local entity.

Throws

\Exception

1 call to TaxonomyTermMatch::addDependency()
TaxonomyTermMatch::onLoadLocalEntity in modules/acquia_contenthub_subscriber/src/EventSubscriber/LoadLocalEntity/TaxonomyTermMatch.php
Load local terms with the same name, vocabulary and relative parent.

File

modules/acquia_contenthub_subscriber/src/EventSubscriber/LoadLocalEntity/TaxonomyTermMatch.php, line 203

Class

TaxonomyTermMatch
Class TaxonomyTermMatch.

Namespace

Drupal\acquia_contenthub_subscriber\EventSubscriber\LoadLocalEntity

Code

protected function addDependency(LoadLocalEntityEvent $event, CDFObject $object, EntityInterface $entity) : void {
  $wrapper = new DependentEntityWrapper($entity);
  $wrapper
    ->setRemoteUuid($object
    ->getUuid());
  $event
    ->getStack()
    ->addDependency($wrapper);
}