Пример #1
0
 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']]];
     }
 }
Пример #2
0
 public function __construct()
 {
     //путь до папки шаблонов
     $this->path = __DIR__ . '/../Views/orders/';
     parent::__construct();
     if (!App::isAdmin()) {
         throw new E403Exception('403. Доступ запрещен.');
     }
 }
Пример #3
0
 public function __construct()
 {
     //путь до папки шаблонов
     $this->path = __DIR__ . '/../Views/news/';
     parent::__construct();
 }