protected function EntityFormController::updateFormLangcode

Updates the form language to reflect any change to the entity language.

Parameters

array $form_state: A keyed array containing the current state of the form.

1 call to EntityFormController::updateFormLangcode()

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 346
Contains \Drupal\Core\Entity\EntityFormController.

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

protected function updateFormLangcode(array $form_state) {

  // Update the form language as it might have changed.
  if (isset($form_state['values']['langcode']) && $this
    ->isDefaultFormLangcode($form_state)) {
    $form_state['langcode'] = $form_state['values']['langcode'];
  }
}