[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/station/playlist/ -> station_playlist.views.inc (source)

   1  <?php
   2  // $Id: station_playlist.views.inc,v 1.5 2010/07/10 16:51:33 timplunkett Exp $
   3  
   4  /**
   5   * Implementation of hook_views_data().
   6   */
   7  function station_playlist_views_data() {
   8    // Basic table information.
   9  
  10    // Define the base group of this table. Fields that don't
  11    // have a group defined will go into this field by default.
  12    $data['station_playlist_track']['table']['group']  = t('Station Playlist Track');
  13    $data['station_playlist_track']['table']['base'] = array(
  14      'field' => 'nid',
  15      'title' => t('Station Playlist Track'),
  16      'help' => t('Station playlist track entries.'),
  17    );
  18  
  19    // For other base tables, explain how we join
  20    $data['station_playlist_track']['table']['join'] = array(
  21      'node' => array(
  22        'handler' => 'views_join', // this is actually optional
  23        'arguments' => array('station_playlist_track', 'node', 'nid', 'nid'),
  24      ),
  25    );
  26  
  27    // ----------------------------------------------------------------
  28    // Fields
  29    $data['station_playlist_track']['nid'] = array(
  30      'title' => t('Playlist node'),
  31      'help' => t("The playlist this track is attached to."),
  32      'relationship' => array(
  33        'base' => 'node',
  34        'base field' => 'nid',
  35        'field' => 'nid',
  36        'handler' => 'views_handler_relationship',
  37        'label' => t('Playlist'),
  38      ),
  39    );
  40    $data['station_playlist_track']['weight'] = array(
  41      'title' => t('Weight'),
  42      'help' => t('The track weight field.'),
  43      'field' => array(
  44        'handler' => 'views_handler_field',
  45        'click sortable' => TRUE,
  46      ),
  47      'filter' => array(
  48        'handler' => 'views_handler_filter_numeric',
  49        'label' => t('Weight'),
  50      ),
  51      'sort' => array(
  52        'handler' => 'views_handler_sort',
  53      ),
  54    );
  55    $data['station_playlist_track']['artist'] = array(
  56      'title' => t('Artist'),
  57      'help' => t("Album artist name."),
  58      'field' => array(
  59        'handler' => 'views_handler_field',
  60        'click sortable' => TRUE,
  61      ),
  62       'filter' => array(
  63         'handler' => 'views_handler_filter_string',
  64         'label' => t('Artist'),
  65      ),
  66      'sort' => array(
  67        'handler' => 'views_handler_sort',
  68      ),
  69    );
  70    $data['station_playlist_track']['album'] = array(
  71      'title' => t('Album'),
  72      'help' => t("Title of the album."),
  73      'field' => array(
  74        'handler' => 'views_handler_field',
  75        'click sortable' => TRUE,
  76      ),
  77       'filter' => array(
  78         'handler' => 'views_handler_filter_string',
  79         'label' => t('Album'),
  80      ),
  81      'sort' => array(
  82        'handler' => 'views_handler_sort',
  83      ),
  84    );
  85    $data['station_playlist_track']['title'] = array(
  86      'title' => t('Title'),
  87      'help' => t("Title of the track."),
  88      'field' => array(
  89        'handler' => 'views_handler_field',
  90        'click sortable' => TRUE,
  91      ),
  92       'filter' => array(
  93         'handler' => 'views_handler_filter_string',
  94         'label' => t('Title'),
  95      ),
  96      'sort' => array(
  97        'handler' => 'views_handler_sort',
  98      ),
  99    );
 100    $data['station_playlist_track']['label'] = array(
 101      'title' => t('Label'),
 102      'help' => t("Name of the label that released the album."),
 103      'field' => array(
 104        'handler' => 'views_handler_field',
 105        'click sortable' => TRUE,
 106      ),
 107      'filter' => array(
 108        'handler' => 'views_handler_filter_string',
 109        'label' => t('Label'),
 110      ),
 111      'sort' => array(
 112        'handler' => 'views_handler_sort',
 113      ),
 114    );
 115    $data['station_playlist_track']['link'] = array(
 116      'title' => t('Link'),
 117      'help' => t("Link to more info on the track."),
 118      'field' => array(
 119        'handler' => 'views_handler_field_url',
 120        'click sortable' => TRUE,
 121      ),
 122      'sort' => array(
 123        'handler' => 'views_handler_sort',
 124      ),
 125    );
 126  
 127    return $data;
 128  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7