1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* File containing the EzPublishCoreBundle class. |
5
|
|
|
* |
6
|
|
|
* @copyright Copyright (C) eZ Systems AS. All rights reserved. |
7
|
|
|
* @license For full copyright and license information view LICENSE file distributed with this source code. |
8
|
|
|
*/ |
9
|
|
|
namespace eZ\Bundle\EzPublishCoreBundle; |
10
|
|
|
|
11
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\AsseticPass; |
12
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\BinaryContentDownloadPass; |
13
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ComplexSettingsPass; |
14
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ConfigResolverParameterPass; |
15
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\FieldTypeParameterProviderRegistryPass; |
16
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\FragmentPass; |
17
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ImaginePass; |
18
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\QueryTypePass; |
19
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterSearchEngineIndexerPass; |
20
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterSearchEnginePass; |
21
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterStorageEnginePass; |
22
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ChainRoutingPass; |
23
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ChainConfigResolverPass; |
24
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\LocalePass; |
25
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ContentViewPass; |
26
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\LocationViewPass; |
27
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\BlockViewPass; |
28
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RouterPass; |
29
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\SecurityPass; |
30
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\SignalSlotPass; |
31
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\TranslationCollectorPass; |
32
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ViewProvidersPass; |
33
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RichTextHtml5ConverterPass; |
34
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\StorageConnectionPass; |
35
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParser; |
36
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParser; |
37
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\RepositoryPolicyProvider; |
38
|
|
|
use eZ\Publish\Core\Base\Container\Compiler\FieldTypeCollectionPass; |
39
|
|
|
use eZ\Publish\Core\Base\Container\Compiler\FieldTypeNameableCollectionPass; |
40
|
|
|
use eZ\Publish\Core\Base\Container\Compiler\RegisterLimitationTypePass; |
41
|
|
|
use eZ\Publish\Core\Base\Container\Compiler\Storage\ExternalStorageRegistryPass; |
42
|
|
|
use eZ\Publish\Core\Base\Container\Compiler\Storage\Legacy\FieldValueConverterRegistryPass; |
43
|
|
|
use eZ\Publish\Core\Base\Container\Compiler\Storage\Legacy\RoleLimitationConverterPass; |
44
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension; |
45
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser as ConfigParser; |
46
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\HttpBasicFactory; |
47
|
|
|
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\URLHandlerPass; |
48
|
|
|
use Symfony\Component\DependencyInjection\Compiler\PassConfig; |
49
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
50
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
51
|
|
|
|
52
|
|
|
class EzPublishCoreBundle extends Bundle |
53
|
|
|
{ |
54
|
|
|
public function build(ContainerBuilder $container) |
55
|
|
|
{ |
56
|
|
|
parent::build($container); |
57
|
|
|
$container->addCompilerPass(new FieldTypeCollectionPass(), PassConfig::TYPE_OPTIMIZE); |
58
|
|
|
$container->addCompilerPass(new FieldTypeNameableCollectionPass(), PassConfig::TYPE_OPTIMIZE); |
59
|
|
|
$container->addCompilerPass(new FieldTypeParameterProviderRegistryPass()); |
60
|
|
|
$container->addCompilerPass(new ChainRoutingPass()); |
61
|
|
|
$container->addCompilerPass(new ChainConfigResolverPass()); |
62
|
|
|
$container->addCompilerPass(new RegisterLimitationTypePass()); |
63
|
|
|
$container->addCompilerPass(new RegisterStorageEnginePass()); |
64
|
|
|
$container->addCompilerPass(new RegisterSearchEnginePass()); |
65
|
|
|
$container->addCompilerPass(new RegisterSearchEngineIndexerPass()); |
66
|
|
|
$container->addCompilerPass(new LocalePass()); |
67
|
|
|
$container->addCompilerPass(new ContentViewPass()); |
|
|
|
|
68
|
|
|
$container->addCompilerPass(new LocationViewPass()); |
|
|
|
|
69
|
|
|
$container->addCompilerPass(new BlockViewPass()); |
|
|
|
|
70
|
|
|
$container->addCompilerPass(new SignalSlotPass()); |
71
|
|
|
$container->addCompilerPass(new RouterPass()); |
72
|
|
|
$container->addCompilerPass(new SecurityPass()); |
73
|
|
|
$container->addCompilerPass(new RichTextHtml5ConverterPass()); |
74
|
|
|
$container->addCompilerPass(new FragmentPass()); |
75
|
|
|
$container->addCompilerPass(new StorageConnectionPass()); |
76
|
|
|
$container->addCompilerPass(new ImaginePass()); |
77
|
|
|
$container->addCompilerPass(new ComplexSettingsPass(new ComplexSettingParser())); |
78
|
|
|
$container->addCompilerPass(new ConfigResolverParameterPass(new DynamicSettingParser())); |
79
|
|
|
$container->addCompilerPass(new AsseticPass()); |
80
|
|
|
$container->addCompilerPass(new URLHandlerPass()); |
81
|
|
|
$container->addCompilerPass(new BinaryContentDownloadPass()); |
82
|
|
|
$container->addCompilerPass(new ViewProvidersPass()); |
83
|
|
|
|
84
|
|
|
// Storage passes |
85
|
|
|
$container->addCompilerPass(new ExternalStorageRegistryPass()); |
86
|
|
|
// Legacy Storage passes |
87
|
|
|
$container->addCompilerPass(new FieldValueConverterRegistryPass()); |
88
|
|
|
$container->addCompilerPass(new RoleLimitationConverterPass()); |
89
|
|
|
$container->addCompilerPass(new QueryTypePass()); |
90
|
|
|
|
91
|
|
|
$securityExtension = $container->getExtension('security'); |
92
|
|
|
$securityExtension->addSecurityListenerFactory(new HttpBasicFactory()); |
|
|
|
|
93
|
|
|
$container->addCompilerPass(new TranslationCollectorPass()); |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
public function getContainerExtension() |
97
|
|
|
{ |
98
|
|
|
if (!isset($this->extension)) { |
99
|
|
|
$this->extension = new EzPublishCoreExtension( |
100
|
|
|
array( |
101
|
|
|
// LocationView config parser needs to be specified AFTER ContentView config |
102
|
|
|
// parser since it is used to convert location view override rules to content |
103
|
|
|
// view override rules. If it were specified before, ContentView provider would |
104
|
|
|
// just undo the conversion LocationView did. |
105
|
|
|
new ConfigParser\ContentView(), |
106
|
|
|
new ConfigParser\LocationView(), |
107
|
|
|
new ConfigParser\BlockView(), |
108
|
|
|
new ConfigParser\Common(), |
109
|
|
|
new ConfigParser\Content(), |
110
|
|
|
new ConfigParser\FieldType\RichText(), |
111
|
|
|
new ConfigParser\FieldTemplates(), |
112
|
|
|
new ConfigParser\FieldEditTemplates(), |
113
|
|
|
new ConfigParser\FieldDefinitionSettingsTemplates(), |
114
|
|
|
new ConfigParser\FieldDefinitionEditTemplates(), |
115
|
|
|
new ConfigParser\Image(), |
116
|
|
|
new ConfigParser\Page(), |
117
|
|
|
new ConfigParser\Languages(), |
118
|
|
|
new ConfigParser\IO(new ComplexSettingParser()), |
119
|
|
|
new ConfigParser\UrlChecker(), |
120
|
|
|
) |
121
|
|
|
); |
122
|
|
|
|
123
|
|
|
$this->extension->addPolicyProvider(new RepositoryPolicyProvider()); |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
return $this->extension; |
|
|
|
|
127
|
|
|
} |
128
|
|
|
} |
129
|
|
|
|
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.