function _patterns_array_trace in Patterns 7.2
Same name and namespace in other branches
- 6.2 patterns.module \_patterns_array_trace()
- 6 patterns.module \_patterns_array_trace()
- 7 includes/unused.inc \_patterns_array_trace()
Helper function to create a list of parent keys given a context item. @TODO Doc.
1 call to _patterns_array_trace()
- _patterns_array_context in includes/
unused.inc - Helper function to create a context array based on the supplied object.
File
- includes/
unused.inc, line 700 - Functions that are unused at the moment.
Code
function _patterns_array_trace($obj) {
// Loop back up through the parents to fill in the trace value.
$up =& $obj;
$trace = array();
while (isset($up['parent'])) {
array_unshift($trace, $up['key']);
$up =& $up['parent'];
}
return $trace;
}