You are here

public function SettingsForm::submitForm in Floating block 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/SettingsForm.php, line 65
Contains \Drupal\floating_block\Form\SettingsForm.

Class

SettingsForm
Defines a form that configures floating_block settings.

Namespace

Drupal\floating_block\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this->configFactory
    ->getEditable('floating_block.settings')
    ->set('blocks', _floating_block_admin_convert_text_to_array($values['blocks']))
    ->save();
}