You are here

function flag_views_data in Flag 8.4

Same name and namespace in other branches
  1. 6.2 includes/flag.views.inc \flag_views_data()
  2. 6 includes/flag.views.inc \flag_views_data()
  3. 7.3 includes/views/flag.views.inc \flag_views_data()
  4. 7.2 includes/flag.views.inc \flag_views_data()

Implements hook_views_data().

File

./flag.views.inc, line 11
Contains views API hooks for Flag module.

Code

function flag_views_data() {
  $data = [];
  $data['flag_counts']['count'] = [
    'title' => t('Flag counter'),
    'help' => t('The number of times a piece of content is flagged by any user.'),
    'field' => [
      'id' => 'numeric',
    ],
  ];
  $data['flag_counts']['last_updated'] = [
    'title' => t('Time last flagged'),
    'help' => t('The time a piece of content was most recently flagged by any user.'),
    'field' => [
      'id' => 'date',
    ],
  ];
  return $data;
}