public function ContentEntitySource::getExistingLangCodes in Translation Management Tool 8
Gets existing translation language codes of the job item source.
Returns language codes that can be used as the source language for a translation job.
Parameters
\Drupal\tmgmt\JobItemInterface $job_item: The job item.
Return value
array Array of language codes.
Overrides SourcePluginBase::getExistingLangCodes
File
- sources/
content/ src/ Plugin/ tmgmt/ Source/ ContentEntitySource.php, line 463
Class
- ContentEntitySource
- Content entity source plugin controller.
Namespace
Drupal\tmgmt_content\Plugin\tmgmt\SourceCode
public function getExistingLangCodes(JobItemInterface $job_item) {
if ($entity = $this
->getEntity($job_item)) {
return array_keys($entity
->getTranslationLanguages());
}
return array();
}