public function TinymceSettingsForm::submitForm in TinyMCE 1.x
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 ConfigFormBase::submitForm
File
- src/
Form/ TinymceSettingsForm.php, line 60
Class
- TinymceSettingsForm
- Implements a TinyMCE settings form.
Namespace
Drupal\tinymce\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this->configFactory
->getEditable('tinymce.settings');
$config
->set('tinymce_self_hosted', $form_state
->getValue('tinymce_self_hosted'));
$config
->set('tinymce_javascript_path', $form_state
->getValue('tinymce_javascript_path'));
$config
->save();
parent::submitForm($form, $form_state);
/** @var \Drupal\Core\Cache\CacheTagsInvalidatorInterface $tagInvalidator */
$tagInvalidator = \Drupal::service('cache_tags.invalidator');
$tagInvalidator
->invalidateTags([
'library_info',
]);
}