/** * BaseController constructor. */ public function __construct() { parent::__construct(); $this->categoriesModel = CategoriesModel::getInstance(); $this->categories = $this->categoriesModel->findAll(); }
/** * Funkce volaná před vykreslováním šablony */ public function beforeRender() { $this->template->categories = $this->categoriesModel->findAll(); }