-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathSuluRedirectBundle.php
54 lines (47 loc) · 1.48 KB
/
SuluRedirectBundle.php
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
<?php
/*
* This file is part of Sulu.
*
* (c) Sulu GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Sulu\Bundle\RedirectBundle;
use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
use Sulu\Bundle\RedirectBundle\Entity\RedirectRoute;
use Sulu\Component\Route\RouteDefaultOptionsCompilerPass;
use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Entry-point for redirect-bundle.
*/
class SuluRedirectBundle extends Bundle
{
use PersistenceBundleTrait;
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(
new TaggedServiceCollectorCompilerPass(
'sulu_redirect.import.aggregate_reader',
'sulu_redirect.import.reader'
)
);
$container->addCompilerPass(
new TaggedServiceCollectorCompilerPass(
'sulu_redirect.import.aggregate_converter',
'sulu_redirect.import.converter'
)
);
$container->addCompilerPass(
new RouteDefaultOptionsCompilerPass('sulu_redirect.routing.provider', 1)
);
$this->buildPersistence(
[
RedirectRoute::class => 'sulu.model.redirect_route.class',
],
$container
);
}
}