You are here

public function Search::calculateDependencies in Search API Autocomplete 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/Search.php, line 499

Class

Search
Describes the autocomplete settings for a certain search.

Namespace

Drupal\search_api_autocomplete\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;
}