public function TMGMTEntitySourcePluginController::getSourceLangCode in Translation Management Tool 7
Gets language code of the job item source.
Parameters
TMGMTJobItem $job_item: The job item.
Return value
string Language code.
Overrides TMGMTSourcePluginControllerInterface::getSourceLangCode
File
- sources/
entity/ tmgmt_entity.plugin.inc, line 91 - Provides the Entity source controller.
Class
- TMGMTEntitySourcePluginController
- @file Provides the Entity source controller.
Code
public function getSourceLangCode(TMGMTJobItem $job_item) {
$entity = entity_load_single($job_item->item_type, $job_item->item_id);
return isset($entity->translations->original) ? $entity->translations->original : NULL;
}