|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Sylius package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Paweł Jędrzejewski |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
declare(strict_types=1); |
|
13
|
|
|
|
|
14
|
|
|
namespace Sylius\Bundle\UiBundle\Tests\Functional; |
|
15
|
|
|
|
|
16
|
|
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
|
17
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
18
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
19
|
|
|
use Symfony\Component\HttpKernel\Kernel as HttpKernel; |
|
20
|
|
|
use Symfony\Component\Routing\RouteCollectionBuilder; |
|
21
|
|
|
|
|
22
|
|
|
final class Kernel extends HttpKernel |
|
23
|
|
|
{ |
|
24
|
|
|
use MicroKernelTrait; |
|
25
|
|
|
|
|
26
|
|
|
public function registerBundles(): array |
|
27
|
|
|
{ |
|
28
|
|
|
return [ |
|
29
|
|
|
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
|
30
|
|
|
new \Symfony\Bundle\SecurityBundle\SecurityBundle(), |
|
31
|
|
|
new \Symfony\Bundle\TwigBundle\TwigBundle(), |
|
32
|
|
|
new \Sonata\BlockBundle\SonataBlockBundle(), |
|
33
|
|
|
new \Sylius\Bundle\UiBundle\SyliusUiBundle(), |
|
34
|
|
|
]; |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
protected function configureContainer(ContainerBuilder $containerBuilder, LoaderInterface $loader): void |
|
|
|
|
|
|
38
|
|
|
{ |
|
39
|
|
|
$containerBuilder->loadFromExtension('framework', [ |
|
40
|
|
|
'secret' => 'S0ME_SECRET', |
|
41
|
|
|
'templating' => [ |
|
42
|
|
|
'engines' => ['twig'], |
|
43
|
|
|
], |
|
44
|
|
|
]); |
|
45
|
|
|
|
|
46
|
|
|
$containerBuilder->loadFromExtension('security', ['firewalls' => ['main' => ['anonymous' => null]]]); |
|
47
|
|
|
|
|
48
|
|
|
$containerBuilder->loadFromExtension( |
|
49
|
|
|
'sonata_block', |
|
50
|
|
|
['blocks' => ['sonata.block.service.template' => ['settings' => ['context' => null]]]] |
|
51
|
|
|
); |
|
52
|
|
|
|
|
53
|
|
|
$containerBuilder->loadFromExtension('sylius_ui', ['events' => [ |
|
54
|
|
|
'first_event' => [ |
|
55
|
|
|
'blocks' => [ |
|
56
|
|
|
'third' => ['template' => 'blocks/third.txt.twig', 'priority' => -5], |
|
57
|
|
|
'first' => ['template' => 'blocks/first.txt.twig', 'priority' => 5], |
|
58
|
|
|
'second' => 'blocks/second.txt.twig', |
|
59
|
|
|
], |
|
60
|
|
|
], |
|
61
|
|
|
'second_event' => [ |
|
62
|
|
|
'blocks' => [ |
|
63
|
|
|
'context' => 'blocks/context.txt.twig', |
|
64
|
|
|
], |
|
65
|
|
|
], |
|
66
|
|
|
]]); |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
protected function configureRoutes(RouteCollectionBuilder $routes): void |
|
|
|
|
|
|
70
|
|
|
{ |
|
71
|
|
|
} |
|
72
|
|
|
} |
|
73
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.