rate.views.inc in Rate 8.2
Same filename and directory in other branches
File
rate.views.incView source
<?php
/**
* @file
* rate.views.inc
*/
/**
* Implements hook_views_data_alter().
*/
function rate_views_data_alter(array &$data) {
$entity_types = \Drupal::entityTypeManager()
->getDefinitions();
foreach ($entity_types as $entity_type_id => $entity_type) {
$data[$entity_type_id][$entity_type_id . '_rate_widget_field'] = [
'title' => t('Rate widget'),
'field' => [
'title' => t('Rate widget'),
'help' => t('Displays a widget to vote this entity.'),
'id' => 'rate_widget_field',
],
];
}
}
Functions
Name | Description |
---|---|
rate_views_data_alter | Implements hook_views_data_alter(). |