protected function registerTwig(Application $app, $base)
    {
        $app->register(new \Silex\Provider\TwigServiceProvider, [
            'twig.path'    => $base.'/templates',
            'twig.options' => [
                'debug' => $app['debug'],
                'cache' => $base.'/cache/templates',
            ],
        ]);

        $this->addDateDefaultFormatToTwig($app);
    }