diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 22:04:49 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-11-11 22:04:49 +0100 |
commit | a64af357ff41a61f5248e2052274315b390e979c (patch) | |
tree | f08323727b1b2a1fc86f8290777cf847f9604334 /app/class/controller.php | |
parent | cea923a1e82a7e8ce696418c3a5a0f7703871101 (diff) | |
download | wcms-a64af357ff41a61f5248e2052274315b390e979c.tar.gz wcms-a64af357ff41a61f5248e2052274315b390e979c.zip |
clean
Diffstat (limited to 'app/class/controller.php')
-rw-r--r-- | app/class/controller.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/class/controller.php b/app/class/controller.php index afeefb0..db13d5a 100644 --- a/app/class/controller.php +++ b/app/class/controller.php @@ -28,6 +28,9 @@ class Controller $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() @@ -57,6 +60,7 @@ class Controller $commonsparams = []; $commonsparams['router'] = $this->router; $commonsparams['user'] = $this->user; + $commonsparams['css'] = Model::csspath(); return $commonsparams; } @@ -92,6 +96,11 @@ class Controller header('Location: ' . $url); } + public function routedirect(string $route, array $vars = []) + { + $this->redirect($this->router->generate($route, $vars)); + } + } |