private function renderNavigation($entries)
{
$nav = '';
foreach ($entries as $entry) {
if (array_key_exists('children', $entry)) {
$icon = '<i class="Nav__arrow"> </i>';
if (array_key_exists('href', $entry)) {
$link = '<a href="' . $entry['href'] . '" class="folder">' . $icon . $entry['title'] . '</a>';
} else {
$link = '<a href="#" class="aj-nav folder">' . $icon . $entry['title'] . '</a>';
}
$link .= $this->renderNavigation($entry['children']);
} else {
$link = '<a href="' . $entry['href'] . '">' . $entry['title'] . '</a>';
}
$nav .= "<li class='Nav__item {$entry['class']}'>{$link}</li>";
}
return "<ul class='Nav'>{$nav}</ul>";
}