function forum_form_taxonomy_term_form_alter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/forum/forum.module \forum_form_taxonomy_term_form_alter()
Implements hook_form_FORM_ID_alter() for taxonomy_term_form().
File
- core/
modules/ forum/ forum.module, line 308 - 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;
}
}