public function EntityTranslationController::getSourceLangcode

Implements EntityTranslationControllerInterface::getSourceLanguage().

Overrides EntityTranslationControllerInterface::getSourceLangcode

4 calls to EntityTranslationController::getSourceLangcode()
EntityTranslationController::entityFormAlter in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Implements EntityTranslationControllerInterface::entityFormAlter().
EntityTranslationController::entityFormEntityBuild in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
Entity builder method.
ProfileTranslationController::entityFormSave in drupal/core/modules/user/lib/Drupal/user/ProfileTranslationController.php
Form submission handler for ProfileTranslationController::entityFormAlter().
TermTranslationController::entityFormSave in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php
Form submission handler for TermTranslationController::entityFormAlter().

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php, line 110
Definition of Drupal\translation_entity\EntityTranslationController.

Class

EntityTranslationController
Base class for entity translation controllers.

Namespace

Drupal\translation_entity

Code

public function getSourceLangcode(array $form_state) {
  return isset($form_state['translation_entity']['source']) ? $form_state['translation_entity']['source']->langcode : FALSE;
}