function tracker_views_data_alter
Same name in other branches
- 8.9.x core/modules/tracker/tracker.views.inc \tracker_views_data_alter()
- 10 core/modules/tracker/tracker.views.inc \tracker_views_data_alter()
- 11.x core/modules/tracker/tracker.views.inc \tracker_views_data_alter()
Implements hook_views_data_alter().
File
-
core/
modules/ tracker/ tracker.views.inc, line 159
Code
function tracker_views_data_alter(&$data) {
// Provide additional uid_touch handlers which are handled by tracker
$data['node_field_data']['uid_touch_tracker'] = [
'group' => t('Tracker - User'),
'title' => t('User posted or commented'),
'help' => t('Display nodes only if a user posted the node or commented on the node.'),
'argument' => [
'field' => 'uid',
'name table' => 'users_field_data',
'name field' => 'name',
'id' => 'tracker_user_uid',
'no group by' => TRUE,
],
'filter' => [
'field' => 'uid',
'name table' => 'users_field_data',
'name field' => 'name',
'id' => 'tracker_user_uid',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.