Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / history / history.views.inc
1 <?php
2
3 /**
4  * @file
5  * Provide views data for history.module.
6  */
7
8 /**
9  * Implements hook_views_data().
10  */
11 function history_views_data() {
12   // History table
13
14   // We're actually defining a specific instance of the table, so let's
15   // alias it so that we can later add the real table for other purposes if we
16   // need it.
17   $data['history']['table']['group']  = t('Content');
18
19   // Explain how this table joins to others.
20   $data['history']['table']['join'] = [
21      // Directly links to node table.
22     'node_field_data' => [
23       'table' => 'history',
24       'left_field' => 'nid',
25       'field' => 'nid',
26       'extra' => [
27         ['field' => 'uid', 'value' => '***CURRENT_USER***', 'numeric' => TRUE],
28       ],
29     ],
30   ];
31
32   $data['history']['timestamp'] = [
33     'title' => t('Has new content'),
34     'field' => [
35       'id' => 'history_user_timestamp',
36       'help' => t('Show a marker if the content is new or updated.'),
37     ],
38     'filter' => [
39       'help' => t('Show only content that is new or updated.'),
40       'id' => 'history_user_timestamp',
41     ],
42   ];
43
44   return $data;
45 }