You are here

public function UnsavedIndexConfiguration::getField in Search API 8

Returns a field from this index.

Parameters

string $field_id: The field identifier.

Return value

\Drupal\search_api\Item\FieldInterface|null The field with the given field identifier, or NULL if there is no such field.

Overrides IndexInterface::getField

File

src/UnsavedIndexConfiguration.php, line 484

Class

UnsavedIndexConfiguration
Represents a configuration of an index that was not yet permanently saved.

Namespace

Drupal\search_api

Code

public function getField($field_id) {
  return $this->entity
    ->getField($field_id);
}