You are here

function taxonomy_unique_taxonomy_form_vocabulary_submit in Taxonomy unique 8

Same name and namespace in other branches
  1. 8.2 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

File

./taxonomy_unique.module, line 34

Code

function taxonomy_unique_taxonomy_form_vocabulary_submit($form, \Drupal\Core\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();
}