uw_ct_event.features.inc 3.38 KB
Newer Older
l26yan's avatar
l26yan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
/**
 * @file
 * uw_ct_event.features.inc
 */

/**
 * Implements hook_ctools_plugin_api().
 */
function uw_ct_event_ctools_plugin_api() {
  list($module, $api) = func_get_args();
  if ($module == "context" && $api == "context") {
    return array("version" => "3");
  }
  list($module, $api) = func_get_args();
  if ($module == "field_group" && $api == "field_group") {
    return array("version" => "1");
  }
  list($module, $api) = func_get_args();
  if ($module == "strongarm" && $api == "strongarm") {
    return array("version" => "1");
  }
}

/**
 * Implements hook_views_api().
 */
function uw_ct_event_views_api() {
  return array("version" => "3.0");
}

/**
 * Implements hook_node_info().
 */
function uw_ct_event_node_info() {
  $items = array(
    'uw_event' => array(
      'name' => t('Event'),
      'base' => 'node_content',
      'description' => t('An event, which is automatically promoted to the front page and appears under the "Events" section of your site.'),
      'has_title' => '1',
      'title_label' => t('Event Title'),
      'help' => '',
    ),
  );
  return $items;
}

/**
 * Implements hook_rdf_default_mappings().
 */
function uw_ct_event_rdf_default_mappings() {
  $schemaorg = array();

  // Exported RDF mapping: uw_event
  $schemaorg['node']['uw_event'] = array(
    'rdftype' => array(
      0 => 'schema:Event',
      1 => 'sioc:Item',
      2 => 'foaf:Document',
    ),
    'title' => array(
      'predicates' => array(
        0 => 'schema:name',
        1 => 'dc:title',
      ),
    ),
    'created' => array(
      'predicates' => array(
        0 => 'dc:date',
        1 => 'dc:created',
      ),
      'datatype' => 'xsd:dateTime',
      'callback' => 'date_iso8601',
    ),
    'changed' => array(
      'predicates' => array(
        0 => 'dc:modified',
      ),
      'datatype' => 'xsd:dateTime',
      'callback' => 'date_iso8601',
    ),
    'body' => array(
      'predicates' => array(
        0 => 'schema:description',
        1 => 'schema:summary',
        2 => 'content:encoded',
      ),
    ),
    'uid' => array(
      'predicates' => array(
        0 => 'sioc:has_creator',
      ),
      'type' => 'rel',
    ),
    'name' => array(
      'predicates' => array(
        0 => 'foaf:name',
      ),
    ),
    'comment_count' => array(
      'predicates' => array(
        0 => 'sioc:num_replies',
      ),
      'datatype' => 'xsd:integer',
    ),
    'last_activity' => array(
      'predicates' => array(
        0 => 'sioc:last_activity_date',
      ),
      'datatype' => 'xsd:dateTime',
      'callback' => 'date_iso8601',
    ),
    'field_event_location' => array(
      'predicates' => array(
        0 => 'schema:location',
      ),
    ),
    'field_event_date' => array(
      'predicates' => array(
        0 => 'schema:startDate',
      ),
    ),
    'field_event_moreinfo_link' => array(
      'predicates' => array(),
    ),
    'field_event_map_link' => array(
      'predicates' => array(),
    ),
    'field_event_host_link' => array(
      'predicates' => array(),
    ),
    'field_image' => array(
      'predicates' => array(),
      'type' => 'rel',
    ),
    'field_file' => array(
      'predicates' => array(),
      'type' => 'rel',
    ),
    'field_event_photo' => array(
      'predicates' => array(),
      'type' => 'rel',
    ),
    'field_event_image' => array(
      'predicates' => array(),
      'type' => 'rel',
    ),
  );

  return $schemaorg;
}