private function setSideMenuItems($_data = null, $additionalItems = false) { self::$data['SideMenu'] = []; self::$isMenuItemsSet = true; if ($_data == null || $_data != null && $additionalItems) { self::$data['SideMenu'] = ['O mnie' => basename(__DIR__) . '/views/o-mnie', 'Formularz' => $this->config()['url'] . 'form', 'Kategorie' => $this->getAllCategories(), 'Gra w oczko' => $this->config()['url'] . 'oczko', 'Google' => 'http://www.google.pl']; if ($this->isAdmin()) { self::$data['SideMenu']['Panel Administracyjny'] = ['Użytkownicy' => $this->config()['url'] . 'administrator/users', 'Kategorie' => $this->config()['url'] . 'administrator/categories']; } if (!$additionalItems) { return; } } foreach ($_data as $key => $item) { self::$data['SideMenu'][$key] = $item; } }