You are here

protected function Index::getFieldDependencies in Search API 8

Retrieves information about the dependencies of the indexed fields.

Return value

string[][][] An associative array containing the dependencies of the indexed fields. The array is keyed by field ID and dependency type, the values are arrays with dependency names.

1 call to Index::getFieldDependencies()
Index::writeChangesToSettings in src/Entity/Index.php
Prepares for changes to this index to be persisted.

File

src/Entity/Index.php, line 1780

Class

Index
Defines the search index configuration entity.

Namespace

Drupal\search_api\Entity

Code

protected function getFieldDependencies() {
  $field_dependencies = [];
  foreach ($this
    ->getDatasources() as $datasource_id => $datasource) {
    $fields = [];
    foreach ($this
      ->getFieldsByDatasource($datasource_id) as $field_id => $field) {
      $fields[$field_id] = $field
        ->getPropertyPath();
    }
    $field_dependencies += $datasource
      ->getFieldDependencies($fields);
  }
  return $field_dependencies;
}