You are here

public function BlockthemeAdminSettingsForm::submitForm in Block Theme 8

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/BlockthemeAdminSettingsForm.php, line 40
Contains \Drupal\blocktheme\Form\HandbookSearchForm.

Class

BlockthemeAdminSettingsForm
Create form for admin page.

Namespace

Drupal\blocktheme\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('blocktheme.settings')
    ->set('blocktheme_themes', $form_state
    ->getValue('blocktheme_themes'))
    ->set('blocktheme_show_custom_block_theme', $form_state
    ->getValue('blocktheme_show_custom_block_theme'))
    ->save();
  parent::submitForm($form, $form_state);
  drupal_theme_rebuild();
}