-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSymEditMediaBundle.php
More file actions
60 lines (50 loc) · 1.74 KB
/
SymEditMediaBundle.php
File metadata and controls
60 lines (50 loc) · 1.74 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
56
57
58
59
60
<?php
/*
* This file is part of the SymEdit package.
*
* (c) Craig Blanchette <craig.blanchette@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SymEdit\Bundle\MediaBundle;
use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
use SymEdit\Bundle\MediaBundle\DependencyInjection\Compiler\GalleryItemFactoryCompilerPass;
use SymEdit\Bundle\MediaBundle\DependencyInjection\SymEditMediaExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class SymEditMediaBundle extends AbstractResourceBundle
{
public function getSupportedDrivers()
{
return [
SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
];
}
protected function getModelInterfaces()
{
return [
'SymEdit\Bundle\MediaBundle\Model\ImageInterface' => 'symedit.model.image.class',
'SymEdit\Bundle\MediaBundle\Model\FileInterface' => 'symedit.model.file.class',
'SymEdit\Bundle\MediaBundle\Model\ImageGalleryInterface' => 'symedit.model.image_gallery.class',
'SymEdit\Bundle\MediaBundle\Model\GalleryItemInterface' => 'symedit.model.gallery_item.class',
];
}
protected function getModelNamespace()
{
return 'SymEdit\Bundle\MediaBundle\Model';
}
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new GalleryItemFactoryCompilerPass());
}
protected function getBundlePrefix()
{
return 'symedit_media';
}
public function getContainerExtension()
{
return new SymEditMediaExtension();
}
}