-
Notifications
You must be signed in to change notification settings - Fork 4
/
providers.php
31 lines (26 loc) · 1.13 KB
/
providers.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
// Register providers
$app->register(new Silex\Provider\SessionServiceProvider());
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
'db.options' => array(
'driver' => 'pdo_sqlite',
'path' => $app['config']['db']['path'],
),
));
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => $app['config']['twig']['paths'],
'twig.form.templates' => array('form/bootstrap.twig'),
));
$app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, $app) {
$twig->addExtension(new Marvin\Marvin\Twig\BootstrapFormExtension());
$twig->addExtension(new Marvin\Marvin\Twig\BootstrapIconExtension('glyphicon'));
$twig->addFilter(require 'Twig/PathsFilter.php');
return $twig;
}));
$app->register(new Silex\Provider\FormServiceProvider());
$app->register(new Silex\Provider\ValidatorServiceProvider());
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'translator.domains' => array(),
));
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());
$app->register(new Cocur\Slugify\Bridge\Silex\SlugifyServiceProvider());