You are here

public function ContentEntity::getFieldDependencies in Search API 8

Retrieves any dependencies of the given fields.

Parameters

string[] $fields: An array of property paths on this datasource, keyed by field IDs.

Return value

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

Overrides DatasourcePluginBase::getFieldDependencies

File

src/Plugin/search_api/datasource/ContentEntity.php, line 1073

Class

ContentEntity
Represents a datasource which exposes the content entities.

Namespace

Drupal\search_api\Plugin\search_api\datasource

Code

public function getFieldDependencies(array $fields) {
  $dependencies = [];
  $properties = $this
    ->getPropertyDefinitions();
  foreach ($fields as $field_id => $property_path) {
    $dependencies[$field_id] = $this
      ->getPropertyPathDependencies($property_path, $properties);
  }
  return $dependencies;
}