You are here

public function AutoIndexNodeSearch::submitConfigurationForm in Auto Index 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides NodeSearch::submitConfigurationForm

File

src/Plugin/Search/AutoIndexNodeSearch.php, line 74

Class

AutoIndexNodeSearch
The method we wish to call on the original object IndexNodeSearch has a protected visibility applied, and therefore we are left with 2 options. Copy and paste the current functionality into this module or extend the existing class. We are extending…

Namespace

Drupal\auto_index\Plugin\Search

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this->configuration['automatic_indexing'] = $form_state
    ->getValue([
    'automatic_indexing',
  ]);
  parent::buildConfigurationForm($form, $form_state);
}