protected function getOrder($navigation, $type = 'page', $parentId = 0, $order = array())
{
// loop alle items for the type and parent
foreach ($navigation[$type][$parentId] as $id => $page) {
// add to array
$order[$id] = $page['full_url'];
// children of root/footer/meta-pages are stored under the page type
if (($type == 'root' || $type == 'footer' || $type == 'meta') && isset($navigation['page'][$id])) {
// process subpages
$order = $this->getOrder($navigation, 'page', $id, $order);
} elseif (isset($navigation[$type][$id])) {
// process subpages
$order = $this->getOrder($navigation, $type, $id, $order);
}
}
// return
return $order;
}