public function NodeTranslationController::entityFormEntityBuild

Overrides EntityTranslationController::entityFormEntityBuild().

Overrides EntityTranslationController::entityFormEntityBuild

File

drupal/core/modules/node/lib/Drupal/node/NodeTranslationController.php, line 60
Definition of Drupal\node\NodeTranslationController.

Class

NodeTranslationController
Defines the translation controller class for nodes.

Namespace

Drupal\node

Code

public function entityFormEntityBuild($entity_type, EntityInterface $entity, array $form, array &$form_state) {
  if (isset($form_state['values']['translation_entity'])) {
    $form_controller = translation_entity_form_controller($form_state);
    $translation =& $form_state['values']['translation_entity'];
    $translation['status'] = $form_controller
      ->getEntity()->status;
    $translation['name'] = $form_state['values']['name'];
    $translation['created'] = $form_state['values']['date'];
  }
  parent::entityFormEntityBuild($entity_type, $entity, $form, $form_state);
}