You are here

function date_ical_entity_info_alter in Date iCal 7.2

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

Implements hook_entity_info_alter().

Add an 'iCal' view mode for entities, which will be used by the Views style plugin.

File

./date_ical.module, line 99
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,
      ),
    );
  }
}