uw_ct_event.features.inc 2.71 KB
Newer Older
ccarigna's avatar
ccarigna committed
1
<?php
Liam Morland's avatar
Liam Morland committed
2

ccarigna's avatar
ccarigna committed
3 4 5 6 7 8
/**
 * @file
 * uw_ct_event.features.inc
 */

/**
9
 * Implements hook_ctools_plugin_api().
ccarigna's avatar
ccarigna committed
10
 */
11
function uw_ct_event_ctools_plugin_api($module = NULL, $api = NULL) {
kpaxman's avatar
kpaxman committed
12 13 14 15 16 17
  if ($module == "context" && $api == "context") {
    return array("version" => "3");
  }
  if ($module == "field_group" && $api == "field_group") {
    return array("version" => "1");
  }
18 19 20
  if ($module == "services" && $api == "services") {
    return array("version" => "3");
  }
kpaxman's avatar
kpaxman committed
21 22 23
  if ($module == "strongarm" && $api == "strongarm") {
    return array("version" => "1");
  }
ccarigna's avatar
ccarigna committed
24 25 26
}

/**
27
 * Implements hook_views_api().
28
 */
29
function uw_ct_event_views_api($module = NULL, $api = NULL) {
30
  return array("api" => "3.0");
31 32 33
}

/**
34
 * Implements hook_node_info().
ccarigna's avatar
ccarigna committed
35 36 37 38 39 40
 */
function uw_ct_event_node_info() {
  $items = array(
    'uw_event' => array(
      'name' => t('Event'),
      'base' => 'node_content',
kolafson's avatar
kolafson committed
41
      'description' => t('An event, which is automatically promoted to the front page and appears under the "Events" section of your site.'),
ccarigna's avatar
ccarigna committed
42
      'has_title' => '1',
Liam Morland's avatar
Liam Morland committed
43
      'title_label' => t('Event Title'),
ccarigna's avatar
ccarigna committed
44 45 46
      'help' => '',
    ),
  );
47
  drupal_alter('node_info', $items);
ccarigna's avatar
ccarigna committed
48 49
  return $items;
}
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

/**
 * 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 => 'dc:title',
        1 => 'schema:name',
      ),
    ),
    '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 => 'content:encoded',
        1 => 'schema:description',
      ),
    ),
    '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_date' => array(
      'predicates' => array(
        0 => 'schema:startDate',
      ),
    ),
  );

  return $schemaorg;
}