2023-03-11 15:14:05 +01:00
|
|
|
<?php
|
|
|
|
/*****************************************************************************
|
|
|
|
* MainMenu.php
|
|
|
|
* Contains the main navigation logic.
|
|
|
|
*
|
2023-04-08 21:32:38 +02:00
|
|
|
* Kabuki CMS (C) 2013-2023, Aaron van Geffen
|
2023-03-11 15:14:05 +01:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
class MainMenu extends Menu
|
|
|
|
{
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->items = [
|
|
|
|
[
|
|
|
|
'uri' => '/',
|
|
|
|
'label' => 'Albums',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'uri' => '/people/',
|
|
|
|
'label' => 'People',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'uri' => '/timeline/',
|
|
|
|
'label' => 'Timeline',
|
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($this->items as $i => $item)
|
|
|
|
{
|
|
|
|
if (isset($item['uri']))
|
|
|
|
$this->items[$i]['url'] = BASEURL . $item['uri'];
|
|
|
|
|
|
|
|
if (!isset($item['subs']))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
foreach ($item['subs'] as $j => $subitem)
|
|
|
|
$this->items[$i]['subs'][$j]['url'] = BASEURL . $subitem['uri'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|