aboutsummaryrefslogtreecommitdiff
path: root/app/class/controller.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-11 19:20:30 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-11 19:20:30 +0100
commitcea923a1e82a7e8ce696418c3a5a0f7703871101 (patch)
treeee2b38865867119a682cb1f97a40522e2bf0f03d /app/class/controller.php
parent45903fe3960b65d63f70188640630c895dbbe222 (diff)
downloadwcms-cea923a1e82a7e8ce696418c3a5a0f7703871101.tar.gz
wcms-cea923a1e82a7e8ce696418c3a5a0f7703871101.zip
correct-basepath
Diffstat (limited to 'app/class/controller.php')
-rw-r--r--app/class/controller.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/class/controller.php b/app/class/controller.php
index c8c620e..afeefb0 100644
--- a/app/class/controller.php
+++ b/app/class/controller.php
@@ -23,7 +23,11 @@ class Controller
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);
+ });
}
public function useriseditor()