You are here

public function PromoteDisableForm::submitForm in Promote Disable 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/PromoteDisableForm.php, line 105

Class

PromoteDisableForm
Class PromoteDisableForm.

Namespace

Drupal\promote_disable\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->config
    ->set('promote_disable_node_types', $form_state
    ->getValue('promote_disable_node_types'));
  $this->config
    ->set('promote_disable_sticky_node_types', $form_state
    ->getValue('promote_disable_sticky_node_types'));
  $this->config
    ->save();
}