public function ContentTranslationHandler::getSourceLangcode in Drupal 10
Same name and namespace in other branches
- 8 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::getSourceLangcode()
- 9 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::getSourceLangcode()
File
- core/
modules/ content_translation/ src/ ContentTranslationHandler.php, line 306
Class
- ContentTranslationHandler
- Base class for content translation handlers.
Namespace
Drupal\content_translationCode
public function getSourceLangcode(FormStateInterface $form_state) {
if ($source = $form_state
->get([
'content_translation',
'source',
])) {
return $source
->getId();
}
return FALSE;
}