You are here

public function TMGMTNodeSourcePluginController::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/node/tmgmt_node.plugin.inc, line 129
Provides the node source plugin controller.

Class

TMGMTNodeSourcePluginController
@file Provides the node source plugin controller.

Code

public function getSourceLangCode(TMGMTJobItem $job_item) {
  if ($node = node_load($job_item->item_id)) {
    return entity_language('node', $node);
  }
  return NULL;
}