You are here

public function TaxonomyBreadcrumbAdminSettings::submitForm in Taxonomy Breadcrumb 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/TaxonomyBreadcrumbAdminSettings.php, line 95

Class

TaxonomyBreadcrumbAdminSettings
Class TaxonomyBreadcrumbAdminSettings.

Namespace

Drupal\taxonomy_breadcrumb\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('taxonomy_breadcrumb.settings');
  $config
    ->set('taxonomy_breadcrumb_home', $form_state
    ->getValue('taxonomy_breadcrumb_home'));
  $config
    ->set('taxonomy_breadcrumb_page_title', $form_state
    ->getValue('taxonomy_breadcrumb_page_title'));
  $config
    ->set('taxonomy_breadcrumb_include_nodes', $form_state
    ->getValue('taxonomy_breadcrumb_include_nodes'));
  $config
    ->set('taxonomy_breadcrumb_node_types', $form_state
    ->getValue('taxonomy_breadcrumb_node_types'));
  $config
    ->save();
  if (method_exists($this, '_submitForm')) {
    $this
      ->_submitForm($form, $form_state);
  }
  parent::submitForm($form, $form_state);
}