You are here

public function EntityProcessorBase::languageOptions in Feeds 8.3

Provides a list of languages available on the site.

Return value

array A keyed array of language_key => language_name. For example: 'en' => 'English').

1 call to EntityProcessorBase::languageOptions()
EntityProcessorBase::entityLanguage in src/Feeds/Processor/EntityProcessorBase.php
Returns the current language for entities.

File

src/Feeds/Processor/EntityProcessorBase.php, line 402

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function languageOptions() {
  foreach ($this->languageManager
    ->getLanguages(LanguageInterface::STATE_ALL) as $language) {
    $langcodes[$language
      ->getId()] = $language
      ->getName();
  }
  return $langcodes;
}