You are here

function taxonomy_unique_taxonomy_form_vocabulary_submit in Taxonomy unique 8.2

Same name and namespace in other branches
  1. 8 taxonomy_unique.module \taxonomy_unique_taxonomy_form_vocabulary_submit()
  2. 7 taxonomy_unique.module \taxonomy_unique_taxonomy_form_vocabulary_submit()
1 string reference to 'taxonomy_unique_taxonomy_form_vocabulary_submit'
taxonomy_unique_form_taxonomy_vocabulary_form_alter in ./taxonomy_unique.module
Implements hook_form_FORM_ID_alter().

File

./taxonomy_unique.module, line 48

Code

function taxonomy_unique_taxonomy_form_vocabulary_submit($form, FormStateInterface $form_state) {

  // Save custom fields to variables.
  \Drupal::configFactory()
    ->getEditable('taxonomy_unique.settings')
    ->set($form_state
    ->getFormObject()
    ->getEntity()
    ->id(), $form_state
    ->getValue('unique'))
    ->set($form_state
    ->getFormObject()
    ->getEntity()
    ->id() . '_message', $form_state
    ->getValue('unique_message'))
    ->save();
}