function _calendar_systems_profiles in Calendar Systems 8
Same name and namespace in other branches
- 7.3 calendar_systems.module \_calendar_systems_profiles()
- 7 calendar_systems.helpers.inc \_calendar_systems_profiles()
- 7.2 calendar_systems.helpers.inc \_calendar_systems_profiles()
Internal static cache helper to get all available profiles.
Return value
An array of available profiles.
3 calls to _calendar_systems_profiles()
- calendar_systems_get_calendar_system_name in ./
calendar_systems.helpers.inc - Helper to determine the active calendar system
- calendar_systems_profile_overview in ./
calendar_systems.admin.inc - Form callback for calendar systems profiles.
- _calendar_systems_date_properties_get_active_calendar_systems in calendar_systems_date_properties/
calendar_systems_date_properties.module
1 string reference to '_calendar_systems_profiles'
- _calendar_systems_date_properties_get_active_calendar_systems in calendar_systems_date_properties/
calendar_systems_date_properties.module
File
- ./
calendar_systems.helpers.inc, line 450
Code
function _calendar_systems_profiles() {
$cache =& drupal_static(__FUNCTION__);
if (!isset($cache)) {
$cache = array();
$profiles = db_query('SELECT language, calendar_system, settings FROM {calendar_systems}');
// Build an array of profiles keyed by the identifiers:
foreach ($profiles as $profile) {
$profile->settings = unserialize($profile->settings);
$cache[$profile->language] = $profile;
}
}
return $cache;
}