date_ical.views.inc 1.39 KB
Newer Older
Robert Rollins's avatar
Robert Rollins committed
1 2 3 4
<?php

/**
 * @file
Robert Rollins's avatar
Robert Rollins committed
5
 * Declares our plugins to Views.
Robert Rollins's avatar
Robert Rollins committed
6 7 8 9 10 11 12
 */

/**
 * Implements hook_views_plugins().
 */
function date_ical_views_plugins() {
  $includes_path = drupal_get_path('module', 'date_ical') . '/includes';
13

Robert Rollins's avatar
Robert Rollins committed
14
  $data = array(
15
    'module' => 'date_ical',
Robert Rollins's avatar
Robert Rollins committed
16 17
    'style' => array(
      'date_ical' => array(
Robert Rollins's avatar
Robert Rollins committed
18
        'type' => 'feed',
19
        'title' => t('iCal Feed'),
Robert Rollins's avatar
Robert Rollins committed
20
        'help' => t('Generates an iCal feed from a View.'),
Robert Rollins's avatar
Robert Rollins committed
21 22 23 24 25 26 27 28 29 30 31
        'handler' => 'date_ical_plugin_style_ical_feed',
        'path' => $includes_path,
        'uses fields' => FALSE,
        'uses grouping' => FALSE,
        'uses row plugin' => TRUE,
        'uses options' => TRUE,
        'even empty' => TRUE,
      ),
    ),
    'row' => array(
      'date_ical' => array(
Robert Rollins's avatar
Robert Rollins committed
32
        'type' => 'feed',
33
        'title' => t('iCal Entity'),
Robert Rollins's avatar
Robert Rollins committed
34
        'help' => t('Render each entity in the view as an iCal VEVENT item.'),
Robert Rollins's avatar
Robert Rollins committed
35 36 37 38 39
        'handler' => 'date_ical_plugin_row_ical_entity',
        'path' => $includes_path,
        'uses options' => TRUE,
        'uses fields' => FALSE,
      ),
40
      'date_ical_fields' => array(
Robert Rollins's avatar
Robert Rollins committed
41
        'type' => 'feed',
42
        'title' => t('iCal Fields'),
Robert Rollins's avatar
Robert Rollins committed
43
        'help' => t('Builds an iCal VEVENT from inidividual Views fields.'),
44 45 46 47 48
        'handler' => 'date_ical_plugin_row_ical_fields',
        'path' => $includes_path,
        'uses options' => TRUE,
        'uses fields' => TRUE,
      ),
Robert Rollins's avatar
Robert Rollins committed
49 50
    ),
  );
51

Robert Rollins's avatar
Robert Rollins committed
52 53
  return $data;
}