You are here

public static function TranslationViewsFieldDefinitions::buildTargetLanguageField in Translation Views 8

Translation target language field definition.

1 call to TranslationViewsFieldDefinitions::buildTargetLanguageField()
translation_views_views_data_alter in ./translation_views.views.inc
Implements hook_views_data_alter().

File

src/TranslationViewsFieldDefinitions.php, line 133

Class

TranslationViewsFieldDefinitions
Class TranslationViewsFieldDefinitions.

Namespace

Drupal\translation_views

Code

public static function buildTargetLanguageField() {
  $field['translation_target_language']['field'] = [
    'title' => t('Target language'),
    'id' => 'translation_views_target_language',
    'help' => t('The target language.'),
  ];
  $field['translation_target_language']['filter'] = [
    'title' => t('Target language'),
    'id' => 'translation_views_target_language',
    'help' => t('Define the target language for other translation fields/filters. This filter should in most cases be used only as exposed filter.'),
  ];
  return $field;
}