14 lines
306 B
PHP
14 lines
306 B
PHP
<?php
|
|
|
|
use Silex\Provider\TwigServiceProvider;
|
|
|
|
$app->register(new TwigServiceProvider(), array(
|
|
'twig.path' => $app['root_path'].'/src/Gist/Resources/views',
|
|
));
|
|
|
|
$app->extend('twig', function ($twig, $app) {
|
|
$twig->addGlobal('web_path', $app['request']->getBaseUrl().'/');
|
|
|
|
return $twig;
|
|
});
|