You are here

publication_date.views.inc in Publication Date 6

Same filename and directory in other branches
  1. 8.2 publication_date.views.inc

Provide views data and handlers for publication_date.module

File

publication_date.views.inc
View source
<?php

/**
 * @file
 * Provide views data and handlers for publication_date.module
 */
function publication_date_views_data() {
  $tables['publication_date']['table']['group'] = t('Node');

  // how is the scheduler table linked to the nodes
  $tables['publication_date']['table']['join']['node'] = array(
    'left_field' => 'nid',
    'field' => 'nid',
  );

  // description of the fields (columns)
  $tables['publication_date']['published_at'] = array(
    'title' => t('Published at'),
    'help' => t('Date/time on which the article has been published'),
    'field' => array(
      'handler' => 'views_handler_field_date',
      'click sortable' => TRUE,
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_date',
      'label' => t('Published at'),
    ),
    'sort' => array(
      'handler' => 'views_handler_sort_date',
    ),
  );
  return $tables;
}

Functions

Namesort descending Description
publication_date_views_data @file Provide views data and handlers for publication_date.module