function TermTranslationHandler::entityFormAlter
Same name in other branches
- 9 core/modules/taxonomy/src/TermTranslationHandler.php \Drupal\taxonomy\TermTranslationHandler::entityFormAlter()
- 8.9.x core/modules/taxonomy/src/TermTranslationHandler.php \Drupal\taxonomy\TermTranslationHandler::entityFormAlter()
- 10 core/modules/taxonomy/src/TermTranslationHandler.php \Drupal\taxonomy\TermTranslationHandler::entityFormAlter()
Overrides ContentTranslationHandler::entityFormAlter
File
-
core/
modules/ taxonomy/ src/ TermTranslationHandler.php, line 17
Class
- TermTranslationHandler
- Defines the translation handler for terms.
Namespace
Drupal\taxonomyCode
public function entityFormAlter(array &$form, FormStateInterface $form_state, EntityInterface $entity) {
parent::entityFormAlter($form, $form_state, $entity);
$form['content_translation']['status']['#access'] = !isset($form['content_translation']);
$form['actions']['submit']['#submit'][] = [
$this,
'entityFormSave',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.