-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNVBoosterPHPCRAssetsBundle.php
More file actions
55 lines (48 loc) · 1.71 KB
/
Copy pathNVBoosterPHPCRAssetsBundle.php
File metadata and controls
55 lines (48 loc) · 1.71 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
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace NVBooster\PHPCRAssetsBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use NVBooster\PHPCRAssetsBundle\DependencyInjection\NVBoosterPHPCRAssetsExtension;
use NVBooster\PHPCRAssetsBundle\DependencyInjection\Compiler\TwigFormThemePass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Doctrine\Bundle\PHPCRBundle\DependencyInjection\Compiler\DoctrinePhpcrMappingsPass;
/**
* @author nvb
*
*/
class NVBoosterPHPCRAssetsBundle extends Bundle
{
/**
* {@inheritDoc}
*
* @see \Symfony\Component\HttpKernel\Bundle\Bundle::getContainerExtension()
*/
public function getContainerExtension()
{
if (null === $this->extension) {
$this->extension = new NVBoosterPHPCRAssetsExtension();
}
return $this->extension;
}
/**
* {@inheritDoc}
*
* @see \Symfony\Component\HttpKernel\Bundle\Bundle::build()
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
if (class_exists('Doctrine\Bundle\PHPCRBundle\DependencyInjection\Compiler\DoctrinePhpcrMappingsPass')) {
$container->addCompilerPass(
DoctrinePhpcrMappingsPass::createXmlMappingDriver(
array(
realpath(__DIR__ . '/Resources/config/doctrine-phpcr') => 'NVBooster\PHPCRAssetsBundle\Asset',
),
array('cmf_core.persistence.phpcr.manager_name'),
false,
array('NVBoosterPHPCRAssetsBundle' => 'NVBooster\PHPCRAssetsBundle\Asset')
)
);
$container->addCompilerPass(new TwigFormThemePass());
}
}
}