function taxonomy_test_form_taxonomy_term_form_alter
Same name in other branches
- 9 core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module \taxonomy_test_form_taxonomy_term_form_alter()
- 8.9.x core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module \taxonomy_test_form_taxonomy_term_form_alter()
- 10 core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module \taxonomy_test_form_taxonomy_term_form_alter()
Implements hook_form_BASE_FORM_ID_alter() for the taxonomy term form.
File
-
core/
modules/ taxonomy/ tests/ modules/ taxonomy_test/ taxonomy_test.module, line 46
Code
function taxonomy_test_form_taxonomy_term_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (\Drupal::state()->get('taxonomy_test.disable_parent_form_element', FALSE)) {
$form['relations']['parent']['#disabled'] = TRUE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.