addSlimPlugins is deprecated
This commit is contained in:
parent
6db29d325e
commit
7746d7d26a
1 changed files with 4 additions and 1 deletions
|
@ -13,7 +13,10 @@ $container = $app->getContainer();
|
||||||
$container['view'] = function ($c) {
|
$container['view'] = function ($c) {
|
||||||
$view = new \Slim\Views\Smarty(__DIR__.'/templates/');
|
$view = new \Slim\Views\Smarty(__DIR__.'/templates/');
|
||||||
|
|
||||||
$view->addSlimPlugins($c['router'], $c['request']->getUri());
|
$smartyPlugins = new \Slim\Views\SmartyPlugins($c['router'], $c['request']->getUri());
|
||||||
|
$view->registerPlugin('function', 'path_for', [$smartyPlugins, 'pathFor']);
|
||||||
|
$view->registerPlugin('function', 'base_url', [$smartyPlugins, 'baseUrl']);
|
||||||
|
|
||||||
$view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme');
|
$view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme');
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue