function _calendar_systems_date_properties_get_active_calendar_systems in Calendar Systems 7.2
Same name and namespace in other branches
- 8 calendar_systems_date_properties/calendar_systems_date_properties.module \_calendar_systems_date_properties_get_active_calendar_systems()
- 7 calendar_systems_date_properties/calendar_systems_date_properties.module \_calendar_systems_date_properties_get_active_calendar_systems()
5 calls to _calendar_systems_date_properties_get_active_calendar_systems()
- calendar_systems_date_properties_entity_presave in calendar_systems_date_properties/
calendar_systems_date_properties.module - hook_entity_presave
- calendar_systems_date_properties_entity_property_info_alter in calendar_systems_date_properties/
calendar_systems_date_properties.module - calendar_systems_date_properties_schema_alter in calendar_systems_date_properties/
calendar_systems_date_properties.module - Implements hook_schema_alter().
- calendar_systems_date_properties_views_data_alter in calendar_systems_date_properties/
calendar_systems_date_properties.views.inc - _calendar_systems_date_properties_schema_apply_change in calendar_systems_date_properties/
calendar_systems_date_properties.module
File
- calendar_systems_date_properties/
calendar_systems_date_properties.module, line 244 - Contains hook implementations and helpers.
Code
function _calendar_systems_date_properties_get_active_calendar_systems() {
static $calendar_systems;
if (!$calendar_systems) {
if (!function_exists('_calendar_systems_profiles')) {
module_load_include('inc', 'calendar_systems', 'calendar_systems.helpers');
}
$profiles = _calendar_systems_profiles();
$calendar_systems = array();
foreach ($profiles as $profile) {
if ($profile->calendar_system != 'gregorian') {
$calendar_systems[$profile->calendar_system] = array(
'name' => $profile->calendar_system,
'label' => $profile->calendar_system,
'parts' => array(
'year' => array(
'label' => 'Year',
),
'month' => array(
'label' => 'Month',
),
'day' => array(
'label' => 'Day',
),
),
);
}
}
}
return $calendar_systems;
}