You are here

public function IndexForm::form in Elasticsearch Connector 8.2

Same name and namespace in other branches
  1. 8.7 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::form()
  2. 8 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::form()
  3. 8.5 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::form()
  4. 8.6 src/Form/IndexForm.php \Drupal\elasticsearch_connector\Form\IndexForm::form()

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/IndexForm.php, line 148
Contains \Drupal\elasticsearch_connector\Form\IndexForm.

Class

IndexForm
Form controller for node type forms.

Namespace

Drupal\elasticsearch_connector\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  if ($form_state
    ->isRebuilding()) {
    $this->entity = $this
      ->buildEntity($form, $form_state);
  }
  $form = parent::form($form, $form_state);
  $form['#title'] = $this
    ->t('Index');
  $this
    ->buildEntityForm($form, $form_state);
  return $form;
}