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

Breadcrumb

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

function TermTranslationHandler::entityFormEntityBuild

Overrides ContentTranslationHandler::entityFormEntityBuild

File

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

Class

TermTranslationHandler
Defines the translation handler for terms.

Namespace

Drupal\taxonomy

Code

public function entityFormEntityBuild($entity_type, EntityInterface $entity, array $form, FormStateInterface $form_state) {
    if ($form_state->hasValue('content_translation')) {
        $translation =& $form_state->getValue('content_translation');
        $translation['status'] = $entity->isPublished();
    }
    parent::entityFormEntityBuild($entity_type, $entity, $form, $form_state);
}

API Navigation

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