You are here

public static function ConfigurationForm::rebuildIndex in Menu Entity Index 8

Form submission handler to rebuild the index.

File

src/Form/ConfigurationForm.php, line 105

Class

ConfigurationForm
Provides a configuration form for administrative settings.

Namespace

Drupal\menu_entity_index\Form

Code

public static function rebuildIndex(array &$form, FormStateInterface $form_state) {
  \Drupal::service('menu_entity_index.tracker')
    ->setConfiguration($form_state
    ->getValues(), TRUE);
  \Drupal::service('messenger')
    ->addStatus(t('The index has been rebuilt.'));
}