public function TagcloudsAdminPage::submitForm in TagCloud 8
Same name and namespace in other branches
- 2.0.x src/Form/TagcloudsAdminPage.php \Drupal\tagclouds\Form\TagcloudsAdminPage::submitForm()
- 1.0.x src/Form/TagcloudsAdminPage.php \Drupal\tagclouds\Form\TagcloudsAdminPage::submitForm()
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/ TagcloudsAdminPage.php, line 125
Class
- TagcloudsAdminPage
- Configure site information settings for this site.
Namespace
Drupal\tagclouds\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('tagclouds.settings')
->set('sort_order', $form_state
->getValue('sort_order'))
->set('display_type', $form_state
->getValue('display_type'))
->set('display_node_link', $form_state
->getValue('display_node_link'))
->set('page_amount', $form_state
->getValue('page_amount'))
->set('levels', $form_state
->getValue('levels'));
if ($form_state
->hasValue('language_separation')) {
$this
->config('tagclouds.settings')
->set('language_separation', $form_state
->getValue('language_separation'));
}
$this
->config('tagclouds.settings')
->save();
parent::submitForm($form, $form_state);
}