public function SourcePluginBase::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 SourcePluginInterface::getExistingLangCodes
4 methods override SourcePluginBase::getExistingLangCodes()
- ConfigSource::getExistingLangCodes in sources/
tmgmt_config/ src/ Plugin/ tmgmt/ Source/ ConfigSource.php - Gets existing translation language codes of the job item source.
- ContentEntitySource::getExistingLangCodes in sources/
content/ src/ Plugin/ tmgmt/ Source/ ContentEntitySource.php - Gets existing translation language codes of the job item source.
- LocaleSource::getExistingLangCodes in sources/
locale/ src/ Plugin/ tmgmt/ Source/ LocaleSource.php - Gets existing translation language codes of the job item source.
- TestSource::getExistingLangCodes in tmgmt_test/
src/ Plugin/ tmgmt/ Source/ TestSource.php - Gets existing translation language codes of the job item source.
File
- src/
SourcePluginBase.php, line 56
Class
- SourcePluginBase
- Default controller class for source plugins.
Namespace
Drupal\tmgmtCode
public function getExistingLangCodes(JobItemInterface $job_item) {
return [
$this
->getSourceLangCode($job_item),
];
}