function forum_form_taxonomy_term_form_alter

forum_form_taxonomy_term_form_alter(&$form, FormStateInterface $form_state, $form_id)

Implements hook_form_FORM_ID_alter() for \Drupal\taxonomy\TermForm.

File

core/modules/forum/forum.module, line 309
Provides discussion forums.

Code

function forum_form_taxonomy_term_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $vid = \Drupal::config('forum.settings')->get('vocabulary');
  if (isset($form['vid']['#value']) && $form['vid']['#value'] == $vid) {
    // Hide multiple parents select from forum terms.
    $form['relations']['parent']['#access'] = FALSE;
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!forum!forum.module/function/forum_form_taxonomy_term_form_alter/8.1.x