You are here

protected function FieldConfigurationForm::getField in Search API 8

Retrieves the field that is being edited.

Return value

\Drupal\search_api\Item\FieldInterface|null The field, if it exists.

4 calls to FieldConfigurationForm::getField()
FieldConfigurationForm::buildForm in src/Form/FieldConfigurationForm.php
Form constructor.
FieldConfigurationForm::form in src/Form/FieldConfigurationForm.php
Gets the actual form array to be built.
FieldConfigurationForm::submitForm in src/Form/FieldConfigurationForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
FieldConfigurationForm::validateForm in src/Form/FieldConfigurationForm.php
Form validation handler.

File

src/Form/FieldConfigurationForm.php, line 228

Class

FieldConfigurationForm
Defines a form for changing a field's configuration.

Namespace

Drupal\search_api\Form

Code

protected function getField() {
  if (!isset($this->field)) {
    $field_id = $this
      ->getRequest()->attributes
      ->get('field_id');
    $this->field = $this->entity
      ->getField($field_id);
  }
  return $this->field;
}