public function TestSource::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
- tmgmt_test/
src/ Plugin/ tmgmt/ Source/ TestSource.php, line 114
Class
- TestSource
- Test source plugin implementation.
Namespace
Drupal\tmgmt_test\Plugin\tmgmt\SourceCode
public function getExistingLangCodes(JobItemInterface $job_item) {
return array_keys(\Drupal::languageManager()
->getLanguages());
}