You are here

public function PullIntent::saveUnresolvedDependency in CMS Content Sync 8

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

Mark the given dependency as missing so it's automatically resolved whenever it gets pulled.

Parameters

array $definition:

null|string $field:

null|array $data:

File

src/PullIntent.php, line 219

Class

PullIntent

Namespace

Drupal\cms_content_sync

Code

public function saveUnresolvedDependency($definition, $field = null, $data = null) {
  $reference = $this->operation
    ->loadReference($definition);

  // User references are ignored.
  if (!$reference
    ->getType() || !$reference
    ->getId() && !$reference
    ->getUuid()) {
    return;
  }
  MissingDependencyManager::saveUnresolvedDependency($reference
    ->getType(), $reference
    ->getId() ? $reference
    ->getId() : $reference
    ->getUuid(), $this
    ->getEntity(), $this
    ->getReason(), $field, $data);
}