You are here

public static function TranslationViewsFieldDefinitions::buildSourceField in Translation Views 8

Translation source field definition.

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

File

src/TranslationViewsFieldDefinitions.php, line 88

Class

TranslationViewsFieldDefinitions
Class TranslationViewsFieldDefinitions.

Namespace

Drupal\translation_views

Code

public static function buildSourceField($definition) {
  $field = [];
  $field['translation_source'] = $definition;
  $field['translation_source']['real field'] = 'content_translation_source';
  $field['translation_source']['field']['id'] = 'translation_views_source_equals_row';
  $field['translation_source']['filter']['id'] = 'translation_views_source_equals_row';
  $field['translation_source']['field']['help'] = t('A boolean indicating whether the translation source of target language is same as the row language');
  $field['translation_source']['filter']['help'] = t('A boolean indicating whether the translation source of target language is same as the row language');
  $field['translation_source']['title'] = t('Source translation of target language equals row language');
  return $field;
}