/** * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { parent::submitForm($form, $form_state); $language_manager = \Drupal::languageManager(); $language_manager->reset(); if ($language_manager instanceof ConfigurableLanguageManagerInterface) { $language_manager->updateLockedLanguageWeights(); } drupal_set_message(t('Configuration saved.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); drupal_set_message(t('The configuration options have been saved.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); filter_formats_reset(); drupal_set_message($this->t('The text format ordering has been saved.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); $search_settings = $this->config('search.settings'); // If these settings change, the default index needs to be rebuilt. if ($search_settings->get('index.minimum_word_size') != $form_state->getValue('minimum_word_size') || $search_settings->get('index.overlap_cjk') != $form_state->getValue('overlap_cjk')) { $search_settings->set('index.minimum_word_size', $form_state->getValue('minimum_word_size')); $search_settings->set('index.overlap_cjk', $form_state->getValue('overlap_cjk')); // Specifically mark items in the default index for reindexing, since // these settings are used in the search_index() function. drupal_set_message($this->t('The default search index will be rebuilt.')); search_mark_for_reindex(); } $search_settings->set('index.cron_limit', $form_state->getValue('cron_limit'))->set('logging', $form_state->getValue('logging'))->save(); drupal_set_message($this->t('The configuration options have been saved.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); // Save the default language if changed. $new_id = $form_state->getValue('site_default_language'); if ($new_id != $this->languageManager->getDefaultLanguage()->getId()) { $this->configFactory->getEditable('system.site')->set('default_langcode', $new_id)->save(); $this->languageManager->reset(); } if ($this->languageManager instanceof ConfigurableLanguageManagerInterface) { $this->languageManager->updateLockedLanguageWeights(); } drupal_set_message(t('Configuration saved.')); // Force the redirection to the page with the language we have just // selected as default. $form_state->setRedirectUrl($this->entities[$new_id]->urlInfo('collection', array('language' => $this->entities[$new_id]))); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); drupal_set_message(t('The order of the translators has been saved.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); drupal_set_message(t('The role settings have been updated.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); drupal_set_message($this->t('Configuration saved.')); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); $search_settings = $this->configFactory->get('search.settings'); // If these settings change, the index needs to be rebuilt. if ($search_settings->get('index.minimum_word_size') != $form_state['values']['minimum_word_size'] || $search_settings->get('index.overlap_cjk') != $form_state['values']['overlap_cjk']) { $search_settings->set('index.minimum_word_size', $form_state['values']['minimum_word_size']); $search_settings->set('index.overlap_cjk', $form_state['values']['overlap_cjk']); drupal_set_message($this->t('The index will be rebuilt.')); search_reindex(); } $search_settings->set('index.cron_limit', $form_state['values']['cron_limit'])->set('logging', $form_state['values']['logging'])->save(); drupal_set_message($this->t('The configuration options have been saved.')); }