function _book_uuid_node_features_pending_get_ancestors in UUID Features Integration 7
Recursively collect ancestor nodes in top-down order.
1 call to _book_uuid_node_features_pending_get_ancestors()
- _book_uuid_node_features_pending_sort in includes/
modules/ book.inc - Sort callback to put parents before children.
File
- includes/
modules/ book.inc, line 180 - uuid_node hooks on behalf of the book module.
Code
function _book_uuid_node_features_pending_get_ancestors($parent_uuid, $pending_by_parent) {
$sorted_pending = array();
if (!empty($pending_by_parent[$parent_uuid])) {
foreach ($pending_by_parent[$parent_uuid] as $uuid => $book) {
$sorted_pending[$uuid] = $book;
$sorted_pending = array_merge($sorted_pending, _book_uuid_node_features_pending_get_ancestors($uuid, $pending_by_parent));
}
}
return $sorted_pending;
}