public function ReindexConfirm::submitForm

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides FormInterface::submitForm

File

drupal/core/modules/search/lib/Drupal/search/Form/ReindexConfirm.php, line 62
Contains \Drupal\search\Form\ReindexConfirm.

Class

ReindexConfirm
Provides the search reindex confirmation form.

Namespace

Drupal\search\Form

Code

public function submitForm(array &$form, array &$form_state) {
  if ($form['confirm']) {
    search_reindex();
    drupal_set_message(t('The index will be rebuilt.'));
    $form_state['redirect'] = 'admin/config/search/settings';
    return;
  }
}