You are here

protected function ContentEntityNormalizer::inDependencies in Content Synchronization 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Normalizer/ContentEntityNormalizer.php \Drupal\content_sync\Normalizer\ContentEntityNormalizer::inDependencies()

Checks if a dependency is in a dependencies nested array.

Parameters

string $dependency: An entity identifier.

$dependencies: A nested array of dependencies.

Return value

bool

1 call to ContentEntityNormalizer::inDependencies()
ContentEntityNormalizer::normalize in src/Normalizer/ContentEntityNormalizer.php

File

src/Normalizer/ContentEntityNormalizer.php, line 180

Class

ContentEntityNormalizer
Adds the file URI to embedded file entities.

Namespace

Drupal\content_sync\Normalizer

Code

protected function inDependencies($dependency, $dependencies) {
  list($entity_type_id, $bundle, $uuid) = explode('.', $dependency);
  if (isset($dependencies[$entity_type_id])) {
    if (in_array($dependency, $dependencies[$entity_type_id])) {
      return TRUE;
    }
  }
  return FALSE;
}