You are here

protected function TranslationTargetLanguageFilter::processColumnOption in Translation Views 8

Process column options.

Parameters

array $languages: Languages array.

string $column: Column name.

array $options: Available language options.

1 call to TranslationTargetLanguageFilter::processColumnOption()
TranslationTargetLanguageFilter::buildLanguageOptions in src/Plugin/views/filter/TranslationTargetLanguageFilter.php
Provide options for langcode dropdown.

File

src/Plugin/views/filter/TranslationTargetLanguageFilter.php, line 275

Class

TranslationTargetLanguageFilter
Provides filtering by translation target language.

Namespace

Drupal\translation_views\Plugin\views\filter

Code

protected function processColumnOption(array $languages, $column, array &$options) {
  $key = "language_{$column}";
  if (isset($languages[$key])) {
    $key = $languages[$key];
    $options[$key] = $this->languageManager
      ->getLanguage($key)
      ->getName();
  }
}