-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMPBCBundle.php
More file actions
executable file
·33 lines (27 loc) · 870 Bytes
/
MPBCBundle.php
File metadata and controls
executable file
·33 lines (27 loc) · 870 Bytes
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
<?php
namespace Plugin\MPBC43;
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class MPBCBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
// Register entity mapping for this plugin
$mappings = [
realpath(__DIR__ . '/Entity') => 'Plugin\MPBC43\Entity',
];
$container->addCompilerPass(
DoctrineOrmMappingsPass::createAnnotationMappingDriver(
$mappings,
['Plugin\MPBC43\Entity']
)
);
}
public function getPath(): string
{
return __DIR__;
}
}