function _patterns_array_trace in Patterns 6
Same name and namespace in other branches
- 6.2 patterns.module \_patterns_array_trace()
- 7.2 includes/unused.inc \_patterns_array_trace()
- 7 includes/unused.inc \_patterns_array_trace()
Helper function to create a list of parent keys given a context item
1 call to _patterns_array_trace()
- _patterns_array_context in ./
patterns.module - Helper function to create a context array based on the supplied object Supplying a parent object will set the parent for this context
File
- ./
patterns.module, line 2757 - Enables extremely simple adding/removing features to your site with minimal to no configuration
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;
}