|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Superdesk Web Publisher Core Bundle. |
|
5
|
|
|
* |
|
6
|
|
|
* Copyright 2015 Sourcefabric z.u. and contributors. |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please see the |
|
9
|
|
|
* AUTHORS and LICENSE files distributed with this source code. |
|
10
|
|
|
* |
|
11
|
|
|
* @copyright 2015 Sourcefabric z.ú |
|
12
|
|
|
* @license http://www.superdesk.org/license |
|
13
|
|
|
*/ |
|
14
|
|
|
|
|
15
|
|
|
namespace SWP\Bundle\CoreBundle; |
|
16
|
|
|
|
|
17
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\AddCustomTwigCachePass; |
|
18
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OrganizationThemesProviderPass; |
|
19
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideArticleBodyProcessorPass; |
|
20
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideArticleSourceAdderPass; |
|
21
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideContainerProviderPass; |
|
22
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideDynamicRouterPass; |
|
23
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideMediaManagerPass; |
|
24
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideSettingsManagerPass; |
|
25
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideTemplatesSystemPass; |
|
26
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideThemeAssetsInstallerPass; |
|
27
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideThemeFactoryPass; |
|
28
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideThemeLoaderPass; |
|
29
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideThemePathResolverPass; |
|
30
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideThemeRepositoryPass; |
|
31
|
|
|
use SWP\Bundle\CoreBundle\DependencyInjection\Compiler\OverrideTwigContentCache; |
|
32
|
|
|
use SWP\Bundle\StorageBundle\DependencyInjection\Bundle\Bundle; |
|
33
|
1 |
|
use SWP\Bundle\StorageBundle\Drivers; |
|
34
|
|
|
use SWP\Bundle\CoreBundle\Theme\Configuration\TenantableConfigurationSourceFactory; |
|
35
|
1 |
|
use Sylius\Bundle\ThemeBundle\DependencyInjection\SyliusThemeExtension; |
|
36
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
37
|
|
|
|
|
38
|
1 |
|
class SWPCoreBundle extends Bundle |
|
39
|
1 |
|
{ |
|
40
|
1 |
|
/** |
|
41
|
1 |
|
* {@inheritdoc} |
|
42
|
1 |
|
*/ |
|
43
|
1 |
|
public function build(ContainerBuilder $container) |
|
44
|
1 |
|
{ |
|
45
|
1 |
|
parent::build($container); |
|
46
|
|
|
|
|
47
|
|
|
/** @var SyliusThemeExtension $themeExtension */ |
|
48
|
|
|
$themeExtension = $container->getExtension('sylius_theme'); |
|
49
|
|
|
$themeExtension->addConfigurationSourceFactory(new TenantableConfigurationSourceFactory()); |
|
50
|
1 |
|
$container->addCompilerPass(new OverrideThemeFactoryPass()); |
|
51
|
|
|
$container->addCompilerPass(new OverrideThemePathResolverPass()); |
|
52
|
|
|
$container->addCompilerPass(new OverrideThemeAssetsInstallerPass()); |
|
53
|
1 |
|
$container->addCompilerPass(new OverrideDynamicRouterPass()); |
|
54
|
|
|
$container->addCompilerPass(new OverrideMediaManagerPass()); |
|
55
|
|
|
$container->addCompilerPass(new OverrideContainerProviderPass()); |
|
56
|
|
|
$container->addCompilerPass(new OverrideTemplatesSystemPass()); |
|
57
|
|
|
$container->addCompilerPass(new OverrideThemeLoaderPass()); |
|
58
|
|
|
$container->addCompilerPass(new OverrideSettingsManagerPass()); |
|
59
|
|
|
$container->addCompilerPass(new OverrideArticleBodyProcessorPass()); |
|
60
|
1 |
|
$container->addCompilerPass(new AddCustomTwigCachePass()); |
|
61
|
|
|
$container->addCompilerPass(new OverrideArticleSourceAdderPass()); |
|
62
|
1 |
|
$container->addCompilerPass(new OrganizationThemesProviderPass()); |
|
63
|
|
|
$container->addCompilerPass(new OverrideThemeRepositoryPass()); |
|
64
|
|
|
$container->addCompilerPass(new OverrideTwigContentCache()); |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* {@inheritdoc} |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getSupportedDrivers() |
|
71
|
|
|
{ |
|
72
|
|
|
return [ |
|
73
|
|
|
Drivers::DRIVER_DOCTRINE_ORM, |
|
74
|
|
|
]; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* {@inheritdoc} |
|
79
|
|
|
*/ |
|
80
|
|
|
public function getModelClassNamespace() |
|
81
|
|
|
{ |
|
82
|
|
|
return 'SWP\Bundle\CoreBundle\Model'; |
|
83
|
|
|
} |
|
84
|
|
|
} |
|
85
|
|
|
|