public function __construct() { parent::__construct(); $result = $this->db->query('SELECT * FROM `topics` ORDER BY `id` ASC'); while (($item = $result->fetch_assoc()) !== null) { $this->view->subMenu[] = ['name' => $item['name'], 'route' => ['pizza/topic', 'topic' => $item['urlName']]]; } }
public function __construct() { //путь до папки шаблонов $this->path = __DIR__ . '/../Views/orders/'; parent::__construct(); if (!App::isAdmin()) { throw new E403Exception('403. Доступ запрещен.'); } }
public function __construct() { //путь до папки шаблонов $this->path = __DIR__ . '/../Views/news/'; parent::__construct(); }