1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
8a7e43dd
|
Florent Torregrosa
|
* Declares our plugins to Views.
|
6 |
85ad3d82
|
Assos Assos
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Implements hook_views_plugins().
|
10 |
|
|
*/
|
11 |
|
|
function date_ical_views_plugins() {
|
12 |
|
|
$includes_path = drupal_get_path('module', 'date_ical') . '/includes';
|
13 |
8a7e43dd
|
Florent Torregrosa
|
|
14 |
85ad3d82
|
Assos Assos
|
$data = array(
|
15 |
|
|
'module' => 'date_ical',
|
16 |
|
|
'style' => array(
|
17 |
|
|
'date_ical' => array(
|
18 |
8a7e43dd
|
Florent Torregrosa
|
'type' => 'feed',
|
19 |
85ad3d82
|
Assos Assos
|
'title' => t('iCal Feed'),
|
20 |
8a7e43dd
|
Florent Torregrosa
|
'help' => t('Generates an iCal feed from a View.'),
|
21 |
85ad3d82
|
Assos Assos
|
'handler' => 'date_ical_plugin_style_ical_feed',
|
22 |
|
|
'path' => $includes_path,
|
23 |
|
|
'uses fields' => FALSE,
|
24 |
|
|
'uses grouping' => FALSE,
|
25 |
|
|
'uses row plugin' => TRUE,
|
26 |
|
|
'uses options' => TRUE,
|
27 |
|
|
'even empty' => TRUE,
|
28 |
|
|
),
|
29 |
|
|
),
|
30 |
|
|
'row' => array(
|
31 |
|
|
'date_ical' => array(
|
32 |
8a7e43dd
|
Florent Torregrosa
|
'type' => 'feed',
|
33 |
85ad3d82
|
Assos Assos
|
'title' => t('iCal Entity'),
|
34 |
8a7e43dd
|
Florent Torregrosa
|
'help' => t('Render each entity in the view as an iCal VEVENT item.'),
|
35 |
85ad3d82
|
Assos Assos
|
'handler' => 'date_ical_plugin_row_ical_entity',
|
36 |
|
|
'path' => $includes_path,
|
37 |
|
|
'uses options' => TRUE,
|
38 |
|
|
'uses fields' => FALSE,
|
39 |
|
|
),
|
40 |
|
|
'date_ical_fields' => array(
|
41 |
8a7e43dd
|
Florent Torregrosa
|
'type' => 'feed',
|
42 |
85ad3d82
|
Assos Assos
|
'title' => t('iCal Fields'),
|
43 |
8a7e43dd
|
Florent Torregrosa
|
'help' => t('Builds an iCal VEVENT from inidividual Views fields.'),
|
44 |
85ad3d82
|
Assos Assos
|
'handler' => 'date_ical_plugin_row_ical_fields',
|
45 |
|
|
'path' => $includes_path,
|
46 |
|
|
'uses options' => TRUE,
|
47 |
|
|
'uses fields' => TRUE,
|
48 |
|
|
),
|
49 |
|
|
),
|
50 |
|
|
);
|
51 |
8a7e43dd
|
Florent Torregrosa
|
|
52 |
85ad3d82
|
Assos Assos
|
return $data;
|
53 |
|
|
} |