function _oa_core_oa_section_ref_process_find_element in Open Atrium Core 7.2
Find the element based on tree parents.
2 calls to _oa_core_oa_section_ref_process_find_element()
- oa_core_oa_section_ref_process in includes/
oa_core.fields.inc - Process function of the oa_section_ref field.
- oa_core_oa_section_ref_replace in includes/
oa_core.fields.inc - Ajax callback to return the section field.
File
- includes/
oa_core.fields.inc, line 286 - Code for custom Form API fields in Open Atrium
Code
function &_oa_core_oa_section_ref_process_find_element(&$form, $parents) {
foreach (element_children($form) as $key) {
if (isset($form[$key]['#parents']) && $form[$key]['#parents'] === $parents) {
$element =& $form[$key];
return $element;
}
if ($element =& _oa_core_oa_section_ref_process_find_element($form[$key], $parents)) {
return $element;
}
}
$element = NULL;
return $element;
}