You are here

public function DependencyStack::hasDependencies in Dependency Calculation 8

Checks if a list of dependencies exist within the stack and are processed.

Parameters

array $targets: An array of UUIDs.

Return value

bool

File

src/DependencyStack.php, line 121

Class

DependencyStack
The dependencies stack.

Namespace

Drupal\depcalc

Code

public function hasDependencies(array $targets) {
  $count = count($targets);
  $targets = array_combine($targets, $targets);
  $intersection = array_intersect_key($targets, $this->dependencies);
  $equal = count($intersection) === $count;
  if ($equal) {
    $intersection = array_intersect_key($targets, $this->additional_processing);
    if ($intersection) {
      return FALSE;
    }
  }
  return $equal;
}