You are here

function _calendar_view_types in Calendar 5.2

Same name and namespace in other branches
  1. 5 calendar_admin.inc \_calendar_view_types()

Function to return all possible calendar views page display types. Implements hook_calendar_add_types($view) for other modules to add calendar types.

1 call to _calendar_view_types()
calendar_view_types in ./calendar.module
Function to return all possible calendar views page display types.

File

./calendar_admin.inc, line 14
This file contains administrative functions used only when setting up the calendar and views_hooks() that are called infrequently and cached. No need to parse all this code the rest of the time.

Code

function _calendar_view_types($reset = FALSE) {
  static $types;
  if ($reset || !isset($types)) {
    $types = array(
      'calendar' => t('Calendar'),
    );
    foreach (module_implements('_calendar_add_types') as $module) {
      $function = $module . '_calendar_add_types';
      $types += $function($view);
    }
  }
  return $types;
}