-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathBDEzPlatformGraphQLBundle.php
More file actions
29 lines (24 loc) · 1 KB
/
BDEzPlatformGraphQLBundle.php
File metadata and controls
29 lines (24 loc) · 1 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
<?php
namespace BD\EzPlatformGraphQLBundle;
use BD\EzPlatformGraphQLBundle\DependencyInjection\Compiler;
use BD\EzPlatformGraphQLBundle\DependencyInjection\Security\PolicyProvider;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class BDEzPlatformGraphQLBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new Compiler\FieldValueTypesPass());
$container->addCompilerPass(new Compiler\FieldValueBuildersPass());
$container->addCompilerPass(new Compiler\SchemaWorkersPass());
$container->addCompilerPass(new Compiler\SchemaBuildersPass());
$this->loadPolicyProviders($container);
}
private function loadPolicyProviders(ContainerBuilder $container)
{
$extension = $container->getExtension('ezpublish');
// Add the policy provider.
$extension->addPolicyProvider(new PolicyProvider());
}
}