function _calendar_systems_profiles_simple in Calendar Systems 7
Same name and namespace in other branches
- 8 calendar_systems.helpers.inc \_calendar_systems_profiles_simple()
- 7.2 calendar_systems.helpers.inc \_calendar_systems_profiles_simple()
Internal static cache helper to get all available profiles for using as form select element options.
Return value
An array of available profiles.
4 calls to _calendar_systems_profiles_simple()
- calendar_systems_date_field_formatter_settings_form_alter in ./
calendar_systems.module - Implements hook_date_field_formatter_settings_form
- calendar_systems_date_field_formatter_settings_summary_alter in ./
calendar_systems.module - Implements date_field_formatter_settings_summary
- calendar_systems_form_field_ui_field_edit_form_alter in ./
calendar_systems.module - Implements hook_form_FORM_ID_alter().
- calendar_systems_profile_overview in ./
calendar_systems.admin.inc - Form callback for calendar systems profiles.
File
- ./
calendar_systems.helpers.inc, line 473
Code
function _calendar_systems_profiles_simple($default_options = FALSE) {
$cache =& drupal_static(__FUNCTION__);
if (!isset($cache)) {
$calendar_systems = _calendar_systems_plugins();
$cache = array();
if ($default_options !== FALSE) {
$cache = $default_options;
}
// Build available calendar systems array:
foreach ($calendar_systems as $id => $calendar_system) {
$cache[$id] = $calendar_system['title'];
}
}
return $cache;
}