function oa_core_refresh_section_values in Open Atrium Core 7.2
Update the section values in a way that skips cache, etc.
1 string reference to 'oa_core_refresh_section_values'
File
- ./
oa_core.module, line 1270
Code
function oa_core_refresh_section_values($element) {
$element['#options'] = array_intersect_key($element['#options'], array(
NULL => '',
'All' => '',
));
$values = entityreference_get_selection_handler(field_info_field('oa_section_ref'))
->getReferencableEntities();
if ($values) {
$element['#options'] += current($values);
}
if ($element['#value'] && !array_key_exists($element['#value'], $element['#options'])) {
$element['#value'] = 'All';
}
return $element;
}