You are here

protected function TranslationTargetLanguageFilter::defineOptions in Translation Views 8

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides FilterPluginBase::defineOptions

File

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

Class

TranslationTargetLanguageFilter
Provides filtering by translation target language.

Namespace

Drupal\translation_views\Plugin\views\filter

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['expose']['contains']['label'] = [
    'default' => $this
      ->t('Target language'),
  ];
  $options['expose']['contains']['identifier'] = [
    'default' => static::$targetExposedKey,
  ];
  $options['value']['default'] = '';
  $options['remove']['default'] = TRUE;
  $options['exposed']['default'] = TRUE;
  if ($this->translatorsContent) {
    $options['limit'] = [
      'default' => FALSE,
    ];
    $options['column'] = [
      'default' => [
        'source' => '',
        'target' => 'target',
      ],
    ];
  }
  return $options;
}