Completed
Push — migrate-files-no-interaction ( 025687...608925 )
by
unknown
46:43 queued 18:48
created

EzPublishCoreExtension::getAlias()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
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
        // Slots
103
        $loader->load('slot.yml');
104
105
        // Default settings
106
        $this->handleDefaultSettingsLoading($container, $loader);
107
108
        $this->registerRepositoriesConfiguration($config, $container);
109
        $this->registerSiteAccessConfiguration($config, $container);
110
        $this->registerImageMagickConfiguration($config, $container);
111
        $this->registerPageConfiguration($config, $container);
112
113
        // Routing
114
        $this->handleRouting($config, $container, $loader);
115
        // Public API loading
116
        $this->handleApiLoading($container, $loader);
117
        $this->handleTemplating($container, $loader);
118
        $this->handleSessionLoading($container, $loader);
119
        $this->handleCache($config, $container, $loader);
120
        $this->handleLocale($config, $container, $loader);
121
        $this->handleHelpers($config, $container, $loader);
122
        $this->handleImage($config, $container, $loader);
123
        $this->handleUrlChecker($config, $container, $loader);
124
125
        // Map settings
126
        $processor = new ConfigurationProcessor($container, 'ezsettings');
127
        $processor->mapConfig($config, $this->getMainConfigParser());
128
129
        if ($this->suggestionCollector->hasSuggestions()) {
130
            $message = '';
131
            $suggestionFormatter = new YamlSuggestionFormatter();
132
            foreach ($this->suggestionCollector->getSuggestions() as $suggestion) {
133
                $message .= $suggestionFormatter->format($suggestion) . "\n\n";
134
            }
135
136
            throw new InvalidArgumentException($message);
137
        }
138
139
        $this->handleSiteAccessesRelation($container);
140
        $this->buildPolicyMap($container);
141
    }
142
143
    /**
144
     * @param array $config
145
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
146
     *
147
     * @return \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration
148
     */
149
    public function getConfiguration(array $config, ContainerBuilder $container)
150
    {
151
        $configuration = new Configuration($this->getMainConfigParser(), $this->suggestionCollector);
152
        $configuration->setSiteAccessConfigurationFilters($this->siteaccessConfigurationFilters);
153
154
        return $configuration;
155
    }
156
157
    /**
158
     * @return \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface
159
     */
160
    private function getMainConfigParser()
161
    {
162
        if ($this->mainConfigParser === null) {
163
            foreach ($this->configParsers as $parser) {
164
                if ($parser instanceof SuggestionCollectorAwareInterface) {
165
                    $parser->setSuggestionCollector($this->suggestionCollector);
166
                }
167
            }
168
169
            $this->mainConfigParser = new ConfigParser($this->configParsers);
170
        }
171
172
        return $this->mainConfigParser;
173
    }
174
175
    /**
176
     * Handle default settings.
177
     *
178
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
179
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
180
     */
181
    private function handleDefaultSettingsLoading(ContainerBuilder $container, FileLoader $loader)
182
    {
183
        $loader->load('default_settings.yml');
184
185
        foreach ($this->defaultSettingsCollection as $fileLocation => $files) {
186
            $externalLoader = new Loader\YamlFileLoader($container, new FileLocator($fileLocation));
187
            foreach ($files as $file) {
188
                $externalLoader->load($file);
189
            }
190
        }
191
    }
192
193
    private function registerRepositoriesConfiguration(array $config, ContainerBuilder $container)
194
    {
195
        if (!isset($config['repositories'])) {
196
            $config['repositories'] = array();
197
        }
198
199
        foreach ($config['repositories'] as $name => &$repository) {
200
            if (empty($repository['fields_groups']['list'])) {
201
                $repository['fields_groups']['list'] = $container->getParameter('ezsettings.default.content.field_groups.list');
202
            }
203
        }
204
205
        $container->setParameter('ezpublish.repositories', $config['repositories']);
206
    }
207
208
    private function registerSiteAccessConfiguration(array $config, ContainerBuilder $container)
209
    {
210
        if (!isset($config['siteaccess'])) {
211
            $config['siteaccess'] = array();
212
            $config['siteaccess']['list'] = array('setup');
213
            $config['siteaccess']['default_siteaccess'] = 'setup';
214
            $config['siteaccess']['groups'] = array();
215
            $config['siteaccess']['match'] = null;
216
        }
217
218
        $container->setParameter('ezpublish.siteaccess.list', $config['siteaccess']['list']);
219
        ConfigurationProcessor::setAvailableSiteAccesses($config['siteaccess']['list']);
220
        $container->setParameter('ezpublish.siteaccess.default', $config['siteaccess']['default_siteaccess']);
221
        $container->setParameter('ezpublish.siteaccess.match_config', $config['siteaccess']['match']);
222
223
        // Register siteaccess groups + reverse
224
        $container->setParameter('ezpublish.siteaccess.groups', $config['siteaccess']['groups']);
225
        $groupsBySiteaccess = array();
226 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...
227
            foreach ($groupMembers as $member) {
228
                if (!isset($groupsBySiteaccess[$member])) {
229
                    $groupsBySiteaccess[$member] = array();
230
                }
231
232
                $groupsBySiteaccess[$member][] = $groupName;
233
            }
234
        }
235
        $container->setParameter('ezpublish.siteaccess.groups_by_siteaccess', $groupsBySiteaccess);
236
        ConfigurationProcessor::setGroupsBySiteAccess($groupsBySiteaccess);
237
    }
238
239
    private function registerImageMagickConfiguration(array $config, ContainerBuilder $container)
240
    {
241
        if (isset($config['imagemagick'])) {
242
            $container->setParameter('ezpublish.image.imagemagick.enabled', $config['imagemagick']['enabled']);
243
            if ($config['imagemagick']['enabled']) {
244
                $container->setParameter('ezpublish.image.imagemagick.executable_path', dirname($config['imagemagick']['path']));
245
                $container->setParameter('ezpublish.image.imagemagick.executable', basename($config['imagemagick']['path']));
246
            }
247
        }
248
249
        $filters = isset($config['imagemagick']['filters']) ? $config['imagemagick']['filters'] : array();
250
        $filters = $filters + $container->getParameter('ezpublish.image.imagemagick.filters');
251
        $container->setParameter('ezpublish.image.imagemagick.filters', $filters);
252
    }
253
254
    private function registerPageConfiguration(array $config, ContainerBuilder $container)
255
    {
256
        if (isset($config['ezpage']['layouts'])) {
257
            $container->setParameter(
258
                'ezpublish.ezpage.layouts',
259
                $config['ezpage']['layouts'] + $container->getParameter('ezpublish.ezpage.layouts')
260
            );
261
        }
262
        if (isset($config['ezpage']['blocks'])) {
263
            $container->setParameter(
264
                'ezpublish.ezpage.blocks',
265
                $config['ezpage']['blocks'] + $container->getParameter('ezpublish.ezpage.blocks')
266
            );
267
        }
268
        if (isset($config['ezpage']['enabledLayouts'])) {
269
            $container->setParameter(
270
                'ezpublish.ezpage.enabledLayouts',
271
                $config['ezpage']['enabledLayouts'] + $container->getParameter('ezpublish.ezpage.enabledLayouts')
272
            );
273
        }
274
        if (isset($config['ezpage']['enabledBlocks'])) {
275
            $container->setParameter(
276
                'ezpublish.ezpage.enabledBlocks',
277
                $config['ezpage']['enabledBlocks'] + $container->getParameter('ezpublish.ezpage.enabledBlocks')
278
            );
279
        }
280
    }
281
282
    /**
283
     * Handle routing parameters.
284
     *
285
     * @param array $config
286
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
287
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
288
     */
289
    private function handleRouting(array $config, ContainerBuilder $container, FileLoader $loader)
290
    {
291
        $loader->load('routing.yml');
292
        $container->setAlias('router', 'ezpublish.chain_router');
293
294
        if (isset($config['router']['default_router']['non_siteaccess_aware_routes'])) {
295
            $container->setParameter(
296
                'ezpublish.default_router.non_siteaccess_aware_routes',
297
                array_merge(
298
                    $container->getParameter('ezpublish.default_router.non_siteaccess_aware_routes'),
299
                    $config['router']['default_router']['non_siteaccess_aware_routes']
300
                )
301
            );
302
        }
303
    }
304
305
    /**
306
     * Handle public API loading.
307
     *
308
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
309
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
310
     */
311
    private function handleApiLoading(ContainerBuilder $container, FileLoader $loader)
312
    {
313
        // Loading configuration from Core/settings
314
        $coreLoader = new Loader\YamlFileLoader(
315
            $container,
316
            new FileLocator(__DIR__ . '/../../../Publish/Core/settings')
317
        );
318
        $coreLoader->load('repository.yml');
319
        $coreLoader->load('repository/inner.yml');
320
        $coreLoader->load('repository/signalslot.yml');
321
        $coreLoader->load('fieldtype_external_storages.yml');
322
        $coreLoader->load('fieldtypes.yml');
323
        $coreLoader->load('indexable_fieldtypes.yml');
324
        $coreLoader->load('roles.yml');
325
        $coreLoader->load('storage_engines/common.yml');
326
        $coreLoader->load('storage_engines/cache.yml');
327
        $coreLoader->load('storage_engines/legacy.yml');
328
        $coreLoader->load('storage_engines/shortcuts.yml');
329
        $coreLoader->load('search_engines/common.yml');
330
        $coreLoader->load('utils.yml');
331
        $coreLoader->load('io.yml');
332
333
        // Public API services
334
        $loader->load('papi.yml');
335
336
        // Built-in field types
337
        $loader->load('fieldtype_services.yml');
338
339
        // Storage engine
340
        $loader->load('storage_engines.yml');
341
    }
342
343
    /**
344
     * Handle templating parameters.
345
     *
346
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
347
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
348
     */
349
    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...
350
    {
351
        $loader->load('templating.yml');
352
    }
353
354
    /**
355
     * Handle session parameters.
356
     *
357
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
358
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
359
     */
360
    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...
361
    {
362
        $loader->load('session.yml');
363
    }
364
365
    /**
366
     * Handle cache parameters.
367
     *
368
     * @param array $config
369
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
370
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
371
     *
372
     * @throws \InvalidArgumentException
373
     */
374
    private function handleCache(array $config, ContainerBuilder $container, FileLoader $loader)
375
    {
376
        $loader->load('cache.yml');
377
378
        $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...
379
        if (isset($config['http_cache']['purge_type'])) {
380
            $container->setParameter('ezpublish.http_cache.purge_type', $config['http_cache']['purge_type']);
381
        }
382
    }
383
384
    /**
385
     * Handle locale parameters.
386
     *
387
     * @param array $config
388
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
389
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
390
     */
391
    private function handleLocale(array $config, ContainerBuilder $container, FileLoader $loader)
392
    {
393
        $loader->load('locale.yml');
394
        $container->setParameter(
395
            'ezpublish.locale.conversion_map',
396
            $config['locale_conversion'] + $container->getParameter('ezpublish.locale.conversion_map')
397
        );
398
    }
399
400
    /**
401
     * Handle helpers.
402
     *
403
     * @param array $config
404
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
405
     * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
406
     */
407
    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...
408
    {
409
        $loader->load('helpers.yml');
410
    }
411
412
    /**
413
     * Handles relation between SiteAccesses.
414
     * Related SiteAccesses share the same repository and root location id.
415
     *
416
     * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
417
     */
418
    private function handleSiteAccessesRelation(ContainerBuilder $container)
419
    {
420
        $configResolver = $container->get('ezpublish.config.resolver.core');
421
        $configResolver->setContainer($container);
422
423
        $saRelationMap = array();
424
        $saList = $container->getParameter('ezpublish.siteaccess.list');
425
        // First build the SiteAccess relation map, indexed by repository and rootLocationId.
426
        foreach ($saList as $sa) {
427
            $repository = $configResolver->getParameter('repository', 'ezsettings', $sa);
428
            if (!isset($saRelationMap[$repository])) {
429
                $saRelationMap[$repository] = array();
430
            }
431
432
            $rootLocationId = $configResolver->getParameter('content.tree_root.location_id', 'ezsettings', $sa);
433
            if (!isset($saRelationMap[$repository][$rootLocationId])) {
434
                $saRelationMap[$repository][$rootLocationId] = array();
435
            }
436
            $saRelationMap[$repository][$rootLocationId][] = $sa;
437
        }
438
        $container->setParameter('ezpublish.siteaccess.relation_map', $saRelationMap);
439
440
        // Now build the related SiteAccesses list, based on the relation map.
441
        foreach ($saList as $sa) {
442
            $repository = $configResolver->getParameter('repository', 'ezsettings', $sa);
443
            $rootLocationId = $configResolver->getParameter('content.tree_root.location_id', 'ezsettings', $sa);
444
            $container->setParameter(
445
                "ezsettings.$sa.related_siteaccesses",
446
                $saRelationMap[$repository][$rootLocationId]
447
            );
448
        }
449
    }
450
451
    /**
452
     * @param array $config
453
     * @param ContainerBuilder $container
454
     * @param FileLoader $loader
455
     */
456
    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...
457
    {
458
        $loader->load('image.yml');
459
    }
460
461
    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...
462
    {
463
        $loader->load('url_checker.yml');
464
    }
465
466
    private function buildPolicyMap(ContainerBuilder $container)
467
    {
468
        $policiesBuilder = new PoliciesConfigBuilder($container);
469
        foreach ($this->policyProviders as $provider) {
470
            $provider->addPolicies($policiesBuilder);
471
        }
472
    }
473
474
    public function prepend(ContainerBuilder $container)
475
    {
476
        // Default settings for FOSHttpCacheBundle
477
        $configFile = __DIR__ . '/../Resources/config/fos_http_cache.yml';
478
        $config = Yaml::parse(file_get_contents($configFile));
479
        $container->prependExtensionConfig('fos_http_cache', $config);
480
        $container->addResource(new FileResource($configFile));
481
    }
482
483
    /**
484
     * Adds a new policy provider to the internal collection.
485
     * One can call this method from a bundle `build()` method.
486
     *
487
     * ```php
488
     * public function build(ContainerBuilder $container)
489
     * {
490
     *     $ezExtension = $container->getExtension('ezpublish');
491
     *     $ezExtension->addPolicyProvider($myPolicyProvider);
492
     * }
493
     * ```
494
     *
495
     * @since 6.0
496
     *
497
     * @param PolicyProviderInterface $policyProvider
498
     */
499
    public function addPolicyProvider(PolicyProviderInterface $policyProvider)
500
    {
501
        $this->policyProviders[] = $policyProvider;
502
    }
503
504
    /**
505
     * Adds a new config parser to the internal collection.
506
     * One can call this method from a bundle `build()` method.
507
     *
508
     * ```php
509
     * public function build(ContainerBuilder $container)
510
     * {
511
     *     $ezExtension = $container->getExtension('ezpublish');
512
     *     $ezExtension->addConfigParser($myConfigParser);
513
     * }
514
     * ```
515
     *
516
     * @since 6.0
517
     *
518
     * @param \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface $configParser
519
     */
520
    public function addConfigParser(ParserInterface $configParser)
521
    {
522
        $this->configParsers[] = $configParser;
523
    }
524
525
    /**
526
     * Adds new default settings to the internal collection.
527
     * One can call this method from a bundle `build()` method.
528
     *
529
     * ```php
530
     * public function build(ContainerBuilder $container)
531
     * {
532
     *     $ezExtension = $container->getExtension('ezpublish');
533
     *     $ezExtension->addDefaultSettings(
534
     *         __DIR__ . '/Resources/config',
535
     *         ['default_settings.yml']
536
     *     );
537
     * }
538
     * ```
539
     *
540
     * @since 6.0
541
     *
542
     * @param string $fileLocation
543
     * @param array $files
544
     */
545
    public function addDefaultSettings($fileLocation, array $files)
546
    {
547
        $this->defaultSettingsCollection[$fileLocation] = $files;
548
    }
549
550
    public function addSiteAccessConfigurationFilter(SiteAccessConfigurationFilter $filter)
551
    {
552
        $this->siteaccessConfigurationFilters[] = $filter;
553
    }
554
}
555