function uuid_book_features_export_traverse in UUID Features Integration 7
Traverse the book tree to get all nodes uuids in the book.
Parameters
array $tree: A subtree of the book menu hierarchy, rooted at the current page.
Return value
array An array of book node uuids.
1 call to uuid_book_features_export_traverse()
- uuid_book_features_export in includes/
uuid_book.features.inc - Implements hook_features_export().
File
- includes/
uuid_book.features.inc, line 55 - Features hooks for the uuid_book features component.
Code
function uuid_book_features_export_traverse(array $tree) {
$book_uuids = array();
foreach ($tree as $data) {
// Note- access checking is already performed when building the tree.
if ($node = node_load($data['link']['nid'], FALSE)) {
$book_uuids[] = $node->uuid;
if ($data['below']) {
$book_uuids = array_merge($book_uuids, uuid_book_features_export_traverse($data['below']));
}
}
}
return $book_uuids;
}