public ConfigTranslationDeleteForm::submitForm(array &$form, FormStateInterface $form_state)
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- core/modules/config_translation/src/Form/ConfigTranslationDeleteForm.php, line 132
Class
- ConfigTranslationDeleteForm
- Builds a form to delete configuration translation.
Namespace
Drupal\config_translation\Form
Code
public function submitForm(array &$form, FormStateInterface $form_state) { foreach ($this->mapper->getConfigNames() as $name) { $this->languageManager->getLanguageConfigOverride($this->language->getId(), $name)->delete(); } // Flush all persistent caches. $this->moduleHandler->invokeAll('cache_flush'); foreach (Cache::getBins() as $cache_backend) { $cache_backend->deleteAll(); } drupal_set_message($this->t('@language translation of %label was deleted', array('%label' => $this->mapper->getTitle(), '@language' => $this->language->getName()))); $form_state->setRedirectUrl($this->getCancelUrl()); }
Please login to continue.