You are here

public static function TranslationViewsFieldDefinitions::buildCountField in Translation Views 8

Translation count field definition.

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

File

src/TranslationViewsFieldDefinitions.php, line 39

Class

TranslationViewsFieldDefinitions
Class TranslationViewsFieldDefinitions.

Namespace

Drupal\translation_views

Code

public static function buildCountField() {
  return [
    'translation_count' => [
      'field_name' => 'counter',
      'real field' => 'translation_langs',
      'title' => t('Translation counter'),
      'field' => [
        'id' => 'translation_views_translation_count',
        'help' => t('Amount of translations.'),
      ],
      'filter' => [
        'id' => 'translation_views_translation_count',
        'help' => t('Filter rows by amount of translations.'),
      ],
    ],
  ];
}