You are here

public function Index::calculateDependencies in Search API 8

Calculates dependencies and stores them in the dependency property.

Return value

$this

Overrides ConfigEntityBase::calculateDependencies

See also

\Drupal\Core\Config\Entity\ConfigDependencyManager

File

src/Entity/Index.php, line 1620

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

public function calculateDependencies() {
  $dependencies = $this
    ->getDependencyData();

  // Keep only "enforced" dependencies, then add those computed by
  // getDependencyData().
  $this->dependencies = array_intersect_key($this->dependencies, [
    'enforced' => TRUE,
  ]);
  $this->dependencies += array_map('array_keys', $dependencies);
  return $this;
}