public function ContentEntitySource::getSourceLangCode in Translation Management Tool 8
Gets language code of the job item source.
Parameters
\Drupal\tmgmt\JobItemInterface $job_item: The job item.
Return value
string Language code.
Overrides SourcePluginInterface::getSourceLangCode
File
- sources/
content/ src/ Plugin/ tmgmt/ Source/ ContentEntitySource.php, line 455
Class
- ContentEntitySource
- Content entity source plugin controller.
Namespace
Drupal\tmgmt_content\Plugin\tmgmt\SourceCode
public function getSourceLangCode(JobItemInterface $job_item) {
$entity = $this
->getEntity($job_item);
return $entity
->getUntranslated()
->language()
->getId();
}