Completed
Push — foshttpcache_remove ( eb4ddf...88b920 )
by André
15:37
created

EzPublishCoreExtension::handleLocale()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 3
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * File containing the EzPublishCoreExtension 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\DependencyInjection;
10
11
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigParser;
12
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor;
13
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector;
14
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollectorAwareInterface;
15
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Formatter\YamlSuggestionFormatter;
16
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PoliciesConfigBuilder;
17
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface;
18
use eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessConfigurationFilter;
19
use Symfony\Component\Config\Resource\FileResource;
20
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
21
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
22
use Symfony\Component\DependencyInjection\ContainerBuilder;
23
use Symfony\Component\DependencyInjection\Loader;
24
use Symfony\Component\DependencyInjection\Loader\FileLoader;
25
use Symfony\Component\Config\FileLocator;
26
use InvalidArgumentException;
27
use Symfony\Component\Yaml\Yaml;
28
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface;
29
30
class EzPublishCoreExtension extends Extension implements PrependExtensionInterface
31
{
32
    /**
33
     * @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector
34
     */
35
    private $suggestionCollector;
36
37
    /**
38
     * @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface
39
     */
40
    private $mainConfigParser;
41
42
    /**
43
     * @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface[]
44
     */
45
    private $configParsers;
46
47
    /**
48
     * @var PolicyProviderInterface[]
49
     */
50
    private $policyProviders = [];
51
52
    /**
53
     * Holds a collection of YAML files, as an array with directory path as a
54
     * key to the array of contained file names.
55
     *
56
     * @var array
57
     */
58
    private $defaultSettingsCollection = [];
59
60
    /**
61
     * @var \eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessConfigurationFilter[]
62
     */
63
    private $siteaccessConfigurationFilters = [];
64
65
    public function __construct(array $configParsers = array())
66
    {
67
        $this->configParsers = $configParsers;
68
        $this->suggestionCollector = new SuggestionCollector();
69
    }
70
71
    public function getAlias()
72
    {
73
        return 'ezpublish';
74
    }
75
76
    /**
77
     * Loads a specific configuration.
78
     *
79
     * @param mixed[] $configs An array of configuration values
80
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container A ContainerBuilder instance
81
     *
82
     * @throws \InvalidArgumentException When provided tag is not defined in this extension
83
     *
84
     * @api
85
     */
86
    public function load(array $configs, ContainerBuilder $container)
87
    {
88
        $loader = new Loader\YamlFileLoader(
89
            $container,
90
            new FileLocator(__DIR__ . '/../Resources/config')
91
        );
92
93
        $configuration = $this->getConfiguration($configs, $container);
94
95
        // Note: this is where the transformation occurs
96
        $config = $this->processConfiguration($configuration, $configs);
97
98
        // Base services and services overrides
99
        $loader->load('services.yml');
100
        // Security services
101
        $loader->load('security.yml');
102
103
        if (interface_exists('FOS\JsRoutingBundle\Extractor\ExposedRoutesExtractorInterface')) {
104
            $loader->load('routing/js_routing.yml');
105
        }
106
107
        // Default settings
108
        $this->handleDefaultSettingsLoading($container, $loader);
109
110
        $this->registerRepositoriesConfiguration($config, $container);
111
        $this->registerSiteAccessConfiguration($config, $container);
112
        $this->registerImageMagickConfiguration($config, $container);
113
        $this->registerPageConfiguration($config, $container);
114
115
        // Routing
116
        $this->handleRouting($config, $container, $loader);
117
        // Public API loading
118
        $this->handleApiLoading($container, $loader);
119
        $this->handleTemplating($container, $loader);
120
        $this->handleSessionLoading($container, $loader);
121
        $this->handleCache($config, $container, $loader);
122
        $this->handleLocale($config, $container, $loader);
123
        $this->handleHelpers($config, $container, $loader);
124
        $this->handleImage($config, $container, $loader);
125
        $this->handleUrlChecker($config, $container, $loader);
126
127
        // Map settings
128
        $processor = new ConfigurationProcessor($container, 'ezsettings');
129
        $processor->mapConfig($config, $this->getMainConfigParser());
130
131
        if ($this->suggestionCollector->hasSuggestions()) {
132
            $message = '';
133
            $suggestionFormatter = new YamlSuggestionFormatter();
134
            foreach ($this->suggestionCollector->getSuggestions() as $suggestion) {
135
                $message .= $suggestionFormatter->format($suggestion) . "\n\n";
136
            }
137
138
            throw new InvalidArgumentException($message);
139
        }
140
141
        $this->handleSiteAccessesRelation($container);
142
        $this->buildPolicyMap($container);
143
    }
144
145
    /**
146
     * @param array $config
147
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
148
     *
149
     * @return \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration
150
     */
151
    public function getConfiguration(array $config, ContainerBuilder $container)
152
    {
153
        $configuration = new Configuration($this->getMainConfigParser(), $this->suggestionCollector);
154
        $configuration->setSiteAccessConfigurationFilters($this->siteaccessConfigurationFilters);
155
156
        return $configuration;
157
    }
158
159
    /**
160
     * @return \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface
161
     */
162
    private function getMainConfigParser()
163
    {
164
        if ($this->mainConfigParser === null) {
165
            foreach ($this->configParsers as $parser) {
166
                if ($parser instanceof SuggestionCollectorAwareInterface) {
167
                    $parser->setSuggestionCollector($this->suggestionCollector);
168
                }
169
            }
170
171
            $this->mainConfigParser = new ConfigParser($this->configParsers);
172
        }
173
174
        return $this->mainConfigParser;
175
    }
176
177
    /**
178
     * Handle default settings.
179
     *
180
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
181
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
182
     */
183
    private function handleDefaultSettingsLoading(ContainerBuilder $container, FileLoader $loader)
184
    {
185
        $loader->load('default_settings.yml');
186
187
        foreach ($this->defaultSettingsCollection as $fileLocation => $files) {
188
            $externalLoader = new Loader\YamlFileLoader($container, new FileLocator($fileLocation));
189
            foreach ($files as $file) {
190
                $externalLoader->load($file);
191
            }
192
        }
193
    }
194
195
    private function registerRepositoriesConfiguration(array $config, ContainerBuilder $container)
196
    {
197
        if (!isset($config['repositories'])) {
198
            $config['repositories'] = array();
199
        }
200
201
        foreach ($config['repositories'] as $name => &$repository) {
202
            if (empty($repository['fields_groups']['list'])) {
203
                $repository['fields_groups']['list'] = $container->getParameter('ezsettings.default.content.field_groups.list');
204
            }
205
        }
206
207
        $container->setParameter('ezpublish.repositories', $config['repositories']);
208
    }
209
210
    private function registerSiteAccessConfiguration(array $config, ContainerBuilder $container)
211
    {
212
        if (!isset($config['siteaccess'])) {
213
            $config['siteaccess'] = array();
214
            $config['siteaccess']['list'] = array('setup');
215
            $config['siteaccess']['default_siteaccess'] = 'setup';
216
            $config['siteaccess']['groups'] = array();
217
            $config['siteaccess']['match'] = null;
218
        }
219
220
        $container->setParameter('ezpublish.siteaccess.list', $config['siteaccess']['list']);
221
        ConfigurationProcessor::setAvailableSiteAccesses($config['siteaccess']['list']);
222
        $container->setParameter('ezpublish.siteaccess.default', $config['siteaccess']['default_siteaccess']);
223
        $container->setParameter('ezpublish.siteaccess.match_config', $config['siteaccess']['match']);
224
225
        // Register siteaccess groups + reverse
226
        $container->setParameter('ezpublish.siteaccess.groups', $config['siteaccess']['groups']);
227
        $groupsBySiteaccess = array();
228 View Code Duplication
        foreach ($config['siteaccess']['groups'] as $groupName => $groupMembers) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
229
            foreach ($groupMembers as $member) {
230
                if (!isset($groupsBySiteaccess[$member])) {
231
                    $groupsBySiteaccess[$member] = array();
232
                }
233
234
                $groupsBySiteaccess[$member][] = $groupName;
235
            }
236
        }
237
        $container->setParameter('ezpublish.siteaccess.groups_by_siteaccess', $groupsBySiteaccess);
238
        ConfigurationProcessor::setGroupsBySiteAccess($groupsBySiteaccess);
239
    }
240
241
    private function registerImageMagickConfiguration(array $config, ContainerBuilder $container)
242
    {
243
        if (isset($config['imagemagick'])) {
244
            $container->setParameter('ezpublish.image.imagemagick.enabled', $config['imagemagick']['enabled']);
245
            if ($config['imagemagick']['enabled']) {
246
                $container->setParameter('ezpublish.image.imagemagick.executable_path', dirname($config['imagemagick']['path']));
247
                $container->setParameter('ezpublish.image.imagemagick.executable', basename($config['imagemagick']['path']));
248
            }
249
        }
250
251
        $filters = isset($config['imagemagick']['filters']) ? $config['imagemagick']['filters'] : array();
252
        $filters = $filters + $container->getParameter('ezpublish.image.imagemagick.filters');
253
        $container->setParameter('ezpublish.image.imagemagick.filters', $filters);
254
    }
255
256
    private function registerPageConfiguration(array $config, ContainerBuilder $container)
257
    {
258
        if (isset($config['ezpage']['layouts'])) {
259
            $container->setParameter(
260
                'ezpublish.ezpage.layouts',
261
                $config['ezpage']['layouts'] + $container->getParameter('ezpublish.ezpage.layouts')
262
            );
263
        }
264
        if (isset($config['ezpage']['blocks'])) {
265
            $container->setParameter(
266
                'ezpublish.ezpage.blocks',
267
                $config['ezpage']['blocks'] + $container->getParameter('ezpublish.ezpage.blocks')
268
            );
269
        }
270
        if (isset($config['ezpage']['enabledLayouts'])) {
271
            $container->setParameter(
272
                'ezpublish.ezpage.enabledLayouts',
273
                $config['ezpage']['enabledLayouts'] + $container->getParameter('ezpublish.ezpage.enabledLayouts')
274
            );
275
        }
276
        if (isset($config['ezpage']['enabledBlocks'])) {
277
            $container->setParameter(
278
                'ezpublish.ezpage.enabledBlocks',
279
                $config['ezpage']['enabledBlocks'] + $container->getParameter('ezpublish.ezpage.enabledBlocks')
280
            );
281
        }
282
    }
283
284
    /**
285
     * Handle routing parameters.
286
     *
287
     * @param array $config
288
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
289
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
290
     */
291
    private function handleRouting(array $config, ContainerBuilder $container, FileLoader $loader)
292
    {
293
        $loader->load('routing.yml');
294
        $container->setAlias('router', 'ezpublish.chain_router');
295
296
        if (isset($config['router']['default_router']['non_siteaccess_aware_routes'])) {
297
            $container->setParameter(
298
                'ezpublish.default_router.non_siteaccess_aware_routes',
299
                array_merge(
300
                    $container->getParameter('ezpublish.default_router.non_siteaccess_aware_routes'),
301
                    $config['router']['default_router']['non_siteaccess_aware_routes']
302
                )
303
            );
304
        }
305
    }
306
307
    /**
308
     * Handle public API loading.
309
     *
310
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
311
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
312
     */
313
    private function handleApiLoading(ContainerBuilder $container, FileLoader $loader)
314
    {
315
        // Loading configuration from Core/settings
316
        $coreLoader = new Loader\YamlFileLoader(
317
            $container,
318
            new FileLocator(__DIR__ . '/../../../Publish/Core/settings')
319
        );
320
        $coreLoader->load('repository.yml');
321
        $coreLoader->load('repository/inner.yml');
322
        $coreLoader->load('repository/signalslot.yml');
323
        $coreLoader->load('fieldtype_external_storages.yml');
324
        $coreLoader->load('fieldtypes.yml');
325
        $coreLoader->load('indexable_fieldtypes.yml');
326
        $coreLoader->load('roles.yml');
327
        $coreLoader->load('storage_engines/common.yml');
328
        $coreLoader->load('storage_engines/cache.yml');
329
        $coreLoader->load('storage_engines/legacy.yml');
330
        $coreLoader->load('storage_engines/shortcuts.yml');
331
        $coreLoader->load('search_engines/common.yml');
332
        $coreLoader->load('utils.yml');
333
        $coreLoader->load('io.yml');
334
335
        // Public API services
336
        $loader->load('papi.yml');
337
338
        // Built-in field types
339
        $loader->load('fieldtype_services.yml');
340
341
        // Storage engine
342
        $loader->load('storage_engines.yml');
343
    }
344
345
    /**
346
     * Handle templating parameters.
347
     *
348
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
349
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
350
     */
351
    private function handleTemplating(ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
352
    {
353
        $loader->load('templating.yml');
354
    }
355
356
    /**
357
     * Handle session parameters.
358
     *
359
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
360
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
361
     */
362
    private function handleSessionLoading(ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
363
    {
364
        $loader->load('session.yml');
365
    }
366
367
    /**
368
     * Handle cache parameters.
369
     *
370
     * @param array $config
371
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
372
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
373
     *
374
     * @throws \InvalidArgumentException
375
     */
376
    private function handleCache(array $config, ContainerBuilder $container, FileLoader $loader)
377
    {
378
        $loader->load('cache.yml');
379
380
        $purgeService = null;
0 ignored issues
show
Unused Code introduced by
$purgeService is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
381
        if (isset($config['http_cache']['purge_type'])) {
382
            $container->setParameter('ezpublish.http_cache.purge_type', $config['http_cache']['purge_type']);
383
        }
384
    }
385
386
    /**
387
     * Handle locale parameters.
388
     *
389
     * @param array $config
390
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
391
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
392
     */
393
    private function handleLocale(array $config, ContainerBuilder $container, FileLoader $loader)
394
    {
395
        $loader->load('locale.yml');
396
        $container->setParameter(
397
            'ezpublish.locale.conversion_map',
398
            $config['locale_conversion'] + $container->getParameter('ezpublish.locale.conversion_map')
399
        );
400
    }
401
402
    /**
403
     * Handle helpers.
404
     *
405
     * @param array $config
406
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
407
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
408
     */
409
    private function handleHelpers(array $config, ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
410
    {
411
        $loader->load('helpers.yml');
412
    }
413
414
    /**
415
     * Handles relation between SiteAccesses.
416
     * Related SiteAccesses share the same repository and root location id.
417
     *
418
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
419
     */
420
    private function handleSiteAccessesRelation(ContainerBuilder $container)
421
    {
422
        $configResolver = $container->get('ezpublish.config.resolver.core');
423
        $configResolver->setContainer($container);
424
425
        $saRelationMap = array();
426
        $saList = $container->getParameter('ezpublish.siteaccess.list');
427
        // First build the SiteAccess relation map, indexed by repository and rootLocationId.
428
        foreach ($saList as $sa) {
429
            $repository = $configResolver->getParameter('repository', 'ezsettings', $sa);
430
            if (!isset($saRelationMap[$repository])) {
431
                $saRelationMap[$repository] = array();
432
            }
433
434
            $rootLocationId = $configResolver->getParameter('content.tree_root.location_id', 'ezsettings', $sa);
435
            if (!isset($saRelationMap[$repository][$rootLocationId])) {
436
                $saRelationMap[$repository][$rootLocationId] = array();
437
            }
438
            $saRelationMap[$repository][$rootLocationId][] = $sa;
439
        }
440
        $container->setParameter('ezpublish.siteaccess.relation_map', $saRelationMap);
441
442
        // Now build the related SiteAccesses list, based on the relation map.
443
        foreach ($saList as $sa) {
444
            $repository = $configResolver->getParameter('repository', 'ezsettings', $sa);
445
            $rootLocationId = $configResolver->getParameter('content.tree_root.location_id', 'ezsettings', $sa);
446
            $container->setParameter(
447
                "ezsettings.$sa.related_siteaccesses",
448
                $saRelationMap[$repository][$rootLocationId]
449
            );
450
        }
451
    }
452
453
    /**
454
     * @param array $config
455
     * @param ContainerBuilder $container
456
     * @param FileLoader $loader
457
     */
458
    private function handleImage(array $config, ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
459
    {
460
        $loader->load('image.yml');
461
    }
462
463
    private function handleUrlChecker($config, ContainerBuilder $container, FileLoader $loader)
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
464
    {
465
        $loader->load('url_checker.yml');
466
    }
467
468
    private function buildPolicyMap(ContainerBuilder $container)
469
    {
470
        $policiesBuilder = new PoliciesConfigBuilder($container);
471
        foreach ($this->policyProviders as $provider) {
472
            $provider->addPolicies($policiesBuilder);
473
        }
474
    }
475
476
    public function prepend(ContainerBuilder $container)
477
    {
478
        // Default settings for FOSHttpCacheBundle
479
        $configFile = __DIR__ . '/../Resources/config/fos_http_cache.yml';
480
        $config = Yaml::parse(file_get_contents($configFile));
481
        $container->prependExtensionConfig('fos_http_cache', $config);
482
        $container->addResource(new FileResource($configFile));
483
    }
484
485
    /**
486
     * Adds a new policy provider to the internal collection.
487
     * One can call this method from a bundle `build()` method.
488
     *
489
     * ```php
490
     * public function build(ContainerBuilder $container)
491
     * {
492
     *     $ezExtension = $container->getExtension('ezpublish');
493
     *     $ezExtension->addPolicyProvider($myPolicyProvider);
494
     * }
495
     * ```
496
     *
497
     * @since 6.0
498
     *
499
     * @param PolicyProviderInterface $policyProvider
500
     */
501
    public function addPolicyProvider(PolicyProviderInterface $policyProvider)
502
    {
503
        $this->policyProviders[] = $policyProvider;
504
    }
505
506
    /**
507
     * Adds a new config parser to the internal collection.
508
     * One can call this method from a bundle `build()` method.
509
     *
510
     * ```php
511
     * public function build(ContainerBuilder $container)
512
     * {
513
     *     $ezExtension = $container->getExtension('ezpublish');
514
     *     $ezExtension->addConfigParser($myConfigParser);
515
     * }
516
     * ```
517
     *
518
     * @since 6.0
519
     *
520
     * @param \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface $configParser
521
     */
522
    public function addConfigParser(ParserInterface $configParser)
523
    {
524
        $this->configParsers[] = $configParser;
525
    }
526
527
    /**
528
     * Adds new default settings to the internal collection.
529
     * One can call this method from a bundle `build()` method.
530
     *
531
     * ```php
532
     * public function build(ContainerBuilder $container)
533
     * {
534
     *     $ezExtension = $container->getExtension('ezpublish');
535
     *     $ezExtension->addDefaultSettings(
536
     *         __DIR__ . '/Resources/config',
537
     *         ['default_settings.yml']
538
     *     );
539
     * }
540
     * ```
541
     *
542
     * @since 6.0
543
     *
544
     * @param string $fileLocation
545
     * @param array $files
546
     */
547
    public function addDefaultSettings($fileLocation, array $files)
548
    {
549
        $this->defaultSettingsCollection[$fileLocation] = $files;
550
    }
551
552
    public function addSiteAccessConfigurationFilter(SiteAccessConfigurationFilter $filter)
553
    {
554
        $this->siteaccessConfigurationFilters[] = $filter;
555
    }
556
}
557