setuser(); $this->router = $router; $this->initplates(); } public function setuser() { $this->usermanager = new Modeluser; $this->user = $this->usermanager->readsession(); } public function initplates() { $router = $this->router; $this->plates = new League\Plates\Engine(Model::TEMPLATES_DIR); $this->plates->registerFunction('url', function (string $string, array $vars = []) use ($router) { return $router->generate($string, $vars); }); $this->plates->registerFunction('uart', function (string $string, string $id) use ($router) { return $router->generate($string, ['art' => $id]); }); } public function useriseditor() { if ($this->user->level() >= $this->usermanager::EDITOR) { echo '