Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TermTranslationHandler.php

function TermTranslationHandler::entityFormAlter

Overrides ContentTranslationHandler::entityFormAlter

File

core/modules/taxonomy/src/TermTranslationHandler.php, line 17

Class

TermTranslationHandler
Defines the translation handler for terms.

Namespace

Drupal\taxonomy

Code

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',
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal