function _forena_query_add_parent_data in Forena Reports 7.3
Assuming a tree=true structure, drill down into parent to add a data structure to the appropriate point in the tree.
Parameters
$values data from form elements:
$parents array of parents that indicates how deep to set the tree.:
$to_add element to add:
1 call to _forena_query_add_parent_data()
- forena_query_add_filter in ./
forena_query.inc - Add another field to the filter.
File
- ./
forena_query.inc, line 526
Code
function _forena_query_add_parent_data(&$values, &$parents, $to_add) {
if ($parents) {
$key = array_shift($parents);
_forena_query_add_parent_data($values[$key], $parents, $to_add);
}
else {
$values[] = $to_add;
}
}