public function EntityFormController::isDefaultFormLangcode

Implements \Drupal\Core\Entity\EntityFormControllerInterface::isDefaultFormLangcode().

Overrides EntityFormControllerInterface::isDefaultFormLangcode

1 call to EntityFormController::isDefaultFormLangcode()
EntityFormController::updateFormLangcode in drupal/core/lib/Drupal/Core/Entity/EntityFormController.php
Updates the form language to reflect any change to the entity language.

File

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

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function isDefaultFormLangcode(array $form_state) {
  return $this
    ->getFormLangcode($form_state) == $this->entity
    ->language()->langcode;
}