You are here

public function FieldConfigurationForm::form in Search API 8

Gets the actual form array to be built.

Overrides EntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

src/Form/FieldConfigurationForm.php, line 147

Class

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

Namespace

Drupal\search_api\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $field = $this
    ->getField();

  /** @var \Drupal\search_api\Processor\ConfigurablePropertyInterface $property */
  $property = $field
    ->getDataDefinition();
  $form = $property
    ->buildConfigurationForm($field, $form, $form_state);
  $this
    ->checkEntityEditable($form, $this->entity);
  return $form;
}