You are here

public static function TranslationViewsFieldDefinitions::buildStatusField in Translation Views 8

Translation status field definition.

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

File

src/TranslationViewsFieldDefinitions.php, line 15

Class

TranslationViewsFieldDefinitions
Class TranslationViewsFieldDefinitions.

Namespace

Drupal\translation_views

Code

public static function buildStatusField() {
  return [
    'translation_status' => [
      'field_name' => 'status',
      'real field' => 'langcode',
      'title' => t('Translation status'),
      'field' => [
        'id' => 'translation_views_status',
        'help' => t('A boolean indicating whether the node is translated into target language.'),
        'additional fields' => [
          'content_translation_source' => 'content_translation_source',
        ],
      ],
      'filter' => [
        'id' => 'translation_views_status',
        'help' => t('A boolean indicating whether the node is translated into target language.'),
      ],
    ],
  ];
}