You are here

function date_ical_entity_info_alter in Date iCal 7

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

Implements hook_entity_info_alter().

Add an 'iCal' view mode for all entities, similar to RSS view mode.

File

./date_ical.module, line 83
Adds ical functionality to Views.

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'),
        'custom settings' => TRUE,
      ),
    );
  }
}