You are here

function pet_views_data in Previewable email templates 6

Implementation of hook_views_data().

File

includes/views/pet.views.inc, line 46
This file provides metadata to the Views 2 API for views integration.

Code

function pet_views_data() {
  $data = array();
  $data['pets'] = array(
    // Table Definition
    'table' => array(
      'group' => t('PET'),
      // Base tables:
      'base' => array(
        'field' => 'pid',
        'title' => t('PET'),
        'help' => t('PETS are Previewable Email Templates.'),
        'weight' => 0,
      ),
    ),
    // Field definitions
    'pid' => array(
      'title' => t('PET pid'),
      'help' => t('The pid of the pet template.'),
      'field' => array(
        'handler' => 'views_handler_field',
        'click sortable' => TRUE,
      ),
      'argument' => array(
        'handler' => 'pet_views_handler_argument_pet_nid',
        'name field' => 'pet template',
      ),
      'filter' => array(
        'handler' => 'views_handler_filter_numeric',
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
    ),
    'name' => array(
      'title' => t('PET name'),
      'help' => t('The name of the pet template.'),
      'field' => array(
        'handler' => 'views_handler_field',
        'click sortable' => TRUE,
      ),
      'argument' => array(
        'handler' => 'pet_views_handler_field_name',
        'name field' => 'pet template',
      ),
      'filter' => array(
        'handler' => 'views_handler_filter',
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
    ),
    'title' => array(
      'title' => t('PET title'),
      'help' => t('The title of the pet template.'),
      'field' => array(
        'handler' => 'views_handler_field',
        'click sortable' => TRUE,
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
    ),
  );
  return $data;
}