-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerformBaseBundle.php
More file actions
42 lines (39 loc) · 1.87 KB
/
PerformBaseBundle.php
File metadata and controls
42 lines (39 loc) · 1.87 KB
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
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace Perform\BaseBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Perform\BaseBundle\DependencyInjection\Compiler\CrudPass;
use Perform\BaseBundle\DependencyInjection\Compiler\CrudVoterPass;
use Perform\BaseBundle\DependencyInjection\Compiler\SettingsPass;
use Perform\BaseBundle\DependencyInjection\Compiler\ActionsPass;
use Perform\BaseBundle\DependencyInjection\Compiler\InstallersPass;
use Perform\BaseBundle\DependencyInjection\Compiler\FieldTypesPass;
use Perform\BaseBundle\DependencyInjection\Compiler\DoctrinePass;
use Perform\BaseBundle\DependencyInjection\Compiler\FormTemplatesPass;
use Perform\BaseBundle\DependencyInjection\Compiler\RequiredServicesPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
/**
* @author Glynn Forrest <me@glynnforrest.com>
**/
class PerformBaseBundle extends Bundle
{
private static $serviceRequirements = [
'perform_base.twig.serializer' => ['serializer'],
'perform_base.menu_builder' => ['knp_menu.factory'],
'perform_base.menu_renderer' => ['knp_menu.matcher'],
];
public function build(ContainerBuilder $container)
{
parent::build($container);
// high priority, run before any passes working with tags
$container->addCompilerPass(new RequiredServicesPass(static::$serviceRequirements), PassConfig::TYPE_BEFORE_OPTIMIZATION, 100);
$container->addCompilerPass(new CrudPass());
$container->addCompilerPass(new CrudVoterPass());
$container->addCompilerPass(new SettingsPass());
$container->addCompilerPass(new ActionsPass());
$container->addCompilerPass(new InstallersPass());
$container->addCompilerPass(new FieldTypesPass());
$container->addCompilerPass(new DoctrinePass());
$container->addCompilerPass(new FormTemplatesPass());
}
}