You are here

function date_ical_entity_info_alter in Date iCal 7.3

Same name and namespace in other branches
  1. 7 date_ical.module \date_ical_entity_info_alter()
  2. 7.2 date_ical.module \date_ical_entity_info_alter()

Implements hook_entity_info_alter().

Adds an 'iCal' view mode for entities, which is used by the iCal Entity View plugin.

File

./date_ical.module, line 138
Adds ical functionality to Views, and an iCal parser to Feeds.

Code

function date_ical_entity_info_alter(&$entity_info) {
  foreach ($entity_info as $entity_type => $info) {
    if (!isset($entity_info[$entity_type]['view modes'])) {
      $entity_info[$entity_type]['view modes'] = array();
    }
    $entity_info[$entity_type]['view modes'] += array(
      'ical' => array(
        'label' => t('iCal'),
        // Set the iCal view mode to default to same settings as the "default"
        // view mode, so it won't pollute Features.
        'custom settings' => FALSE,
      ),
    );
  }
}