You are here

pmproject.views.inc in Drupal PM (Project Management) 7.3

Same filename and directory in other branches
  1. 8 pmproject/pmproject.views.inc
  2. 7 pmproject/pmproject.views.inc

Views integration settings.

File

pmproject/pmproject.views.inc
View source
<?php

/**
 * @file
 * Views integration settings.
 */

/**
 * Implements hook_views_data().
 */
function pmproject_views_data() {
  $data = array();
  $data['pmproject_index']['table']['group'] = t('Drupal PM');
  $data['pmproject_index']['table']['base'] = array(
    'title' => t('PM Project'),
  );
  $data['pmproject_index']['table']['join'] = array(
    'node' => array(
      'left_field' => 'nid',
      'field' => 'nid',
    ),
  );

  // The pmproject_nid field.
  $data['pmproject_index']['pmproject_nid'] = array(
    'title' => t('PM Project'),
    'help' => t('PM Project the content is attached to.'),
    'relationship' => array(
      'base' => 'node',
      'field' => 'pmproject_nid',
      'handler' => 'views_handler_relationship',
      'label' => t('PM Project'),
    ),
  );
  return $data;
}

Functions

Namesort descending Description
pmproject_views_data Implements hook_views_data().