|  | 
| 4 | 4 | 
 | 
| 5 | 5 | use SumoCoders\FrameworkCoreBundle\Command\SecretsGetCommand; | 
| 6 | 6 | use SumoCoders\FrameworkCoreBundle\Command\TranslateCommand; | 
|  | 7 | +use SumoCoders\FrameworkCoreBundle\EventListener\TitleListener; | 
|  | 8 | +use SumoCoders\FrameworkCoreBundle\Service\PageTitle; | 
| 7 | 9 | use SumoCoders\FrameworkCoreBundle\Twig\ContentExtension; | 
| 8 | 10 | use Symfony\Component\Form\Extension\Core\Type\TimeType; | 
| 9 | 11 | use SumoCoders\FrameworkCoreBundle\Service\Fallbacks; | 
|  | 
| 40 | 42 |          * Services | 
| 41 | 43 |          */ | 
| 42 | 44 |         ->set('framework.fallbacks', Fallbacks::class) | 
| 43 |  | -            ->args([ | 
| 44 |  | -                param('fallbacks') | 
| 45 |  | -            ]) | 
|  | 45 | +        ->args([ | 
|  | 46 | +            param('fallbacks') | 
|  | 47 | +        ]) | 
| 46 | 48 | 
 | 
| 47 | 49 |         /* | 
| 48 | 50 |          * Menu | 
| 49 | 51 |          */ | 
| 50 | 52 |         ->set('framework.menu_builder', MenuBuilder::class) | 
| 51 |  | -            ->args([ | 
| 52 |  | -                service('knp_menu.factory'), | 
| 53 |  | -                service('event_dispatcher') | 
| 54 |  | -            ]) | 
| 55 |  | -            ->tag('knp_menu.menu_builder', ['method' => 'createMainMenu', 'alias' => 'side_menu']) | 
|  | 53 | +        ->args([ | 
|  | 54 | +            service('knp_menu.factory'), | 
|  | 55 | +            service('event_dispatcher') | 
|  | 56 | +        ]) | 
|  | 57 | +        ->tag('knp_menu.menu_builder', ['method' => 'createMainMenu', 'alias' => 'side_menu']) | 
| 56 | 58 | 
 | 
| 57 | 59 |         /* | 
| 58 | 60 |          * Forms | 
| 59 | 61 |          */ | 
| 60 | 62 |         ->set('framework.date_type_extension', DateTypeExtension::class) | 
| 61 |  | -            ->tag('form.type_extension', ['extended_type' => DateType::class]) | 
|  | 63 | +        ->tag('form.type_extension', ['extended_type' => DateType::class]) | 
| 62 | 64 | 
 | 
| 63 | 65 |         ->set('framework.time_type_extension', TimeTypeExtension::class) | 
| 64 |  | -            ->tag('form.type_extension', ['extended_type' => TimeType::class]) | 
|  | 66 | +        ->tag('form.type_extension', ['extended_type' => TimeType::class]) | 
| 65 | 67 | 
 | 
| 66 | 68 |         ->set('framework.date_time_type_extension', DateTimeTypeExtension::class) | 
| 67 |  | -            ->tag('form.type_extension', ['extended_type' => DateTimeType::class]) | 
|  | 69 | +        ->tag('form.type_extension', ['extended_type' => DateTimeType::class]) | 
| 68 | 70 | 
 | 
| 69 | 71 |         ->set('framework.birthday_type_extension', BirthdayTypeExtension::class) | 
| 70 |  | -            ->tag('form.type_extension', ['extended_type' => BirthdayType::class]) | 
|  | 72 | +        ->tag('form.type_extension', ['extended_type' => BirthdayType::class]) | 
| 71 | 73 | 
 | 
| 72 | 74 |         ->set('framework.collection_type_extension', CollectionTypeExtension::class) | 
| 73 |  | -            ->tag('form.type_extension', ['extended_type' => CollectionType::class]) | 
|  | 75 | +        ->tag('form.type_extension', ['extended_type' => CollectionType::class]) | 
| 74 | 76 | 
 | 
| 75 | 77 |         ->set('framework.image_type', ImageType::class) | 
| 76 |  | -            ->tag('form.type', ['alias' => 'image']) | 
|  | 78 | +        ->tag('form.type', ['alias' => 'image']) | 
| 77 | 79 | 
 | 
| 78 | 80 |         ->set('framework.file_type', FileType::class) | 
| 79 |  | -            ->tag('form.type', ['alias' => 'sumoFile']) | 
|  | 81 | +        ->tag('form.type', ['alias' => 'sumoFile']) | 
| 80 | 82 | 
 | 
| 81 | 83 |         /* | 
| 82 | 84 |          * Secure headers | 
| 83 | 85 |          */ | 
| 84 | 86 |         ->set('framework.response_securer', ResponseSecurer::class) | 
| 85 |  | -            ->args([ | 
| 86 |  | -                param('kernel.debug'), | 
| 87 |  | -                param('sumo_coders_framework_core.content_security_policy'), | 
| 88 |  | -                param('sumo_coders_framework_core.extra_content_security_policy'), | 
| 89 |  | -                param('sumo_coders_framework_core.x_frame_options'), | 
| 90 |  | -                param('sumo_coders_framework_core.x_content_type_options'), | 
| 91 |  | -            ]) | 
| 92 |  | -            ->tag('kernel.event_listener', ['event' => 'kernel.response', 'method' => 'onKernelResponse']) | 
|  | 87 | +        ->args([ | 
|  | 88 | +            param('kernel.debug'), | 
|  | 89 | +            param('sumo_coders_framework_core.content_security_policy'), | 
|  | 90 | +            param('sumo_coders_framework_core.extra_content_security_policy'), | 
|  | 91 | +            param('sumo_coders_framework_core.x_frame_options'), | 
|  | 92 | +            param('sumo_coders_framework_core.x_content_type_options'), | 
|  | 93 | +        ]) | 
|  | 94 | +        ->tag('kernel.event_listener', ['event' => 'kernel.response', 'method' => 'onKernelResponse']) | 
| 93 | 95 | 
 | 
| 94 | 96 |         /* | 
| 95 | 97 |          * Twig extensions | 
| 96 | 98 |          */ | 
| 97 | 99 |         ->set('framework.framework_extension', FrameworkExtension::class) | 
| 98 |  | -            ->tag('twig.extension') | 
|  | 100 | +        ->tag('twig.extension') | 
| 99 | 101 | 
 | 
| 100 | 102 |         ->set('framework.paginator_extension', PaginatorExtension::class) | 
| 101 |  | -            ->tag('twig.extension') | 
|  | 103 | +        ->tag('twig.extension') | 
| 102 | 104 | 
 | 
| 103 | 105 |         ->set('framework.paginator_runtime', PaginatorRuntime::class) | 
| 104 |  | -            ->tag('twig.runtime') | 
|  | 106 | +        ->tag('twig.runtime') | 
| 105 | 107 | 
 | 
| 106 | 108 |         ->set('framework.content_extension', ContentExtension::class) | 
| 107 |  | -            ->tag('twig.extension') | 
|  | 109 | +        ->tag('twig.extension') | 
| 108 | 110 | 
 | 
| 109 | 111 |         /* | 
| 110 | 112 |          * Breadcrumbs | 
|  | 
| 113 | 115 |         ->alias(BreadcrumbTrail::class, 'framework.breadcrumb_trail') | 
| 114 | 116 | 
 | 
| 115 | 117 |         ->set('framework.breadcrumb_listener', BreadcrumbListener::class) | 
| 116 |  | -            ->tag( | 
| 117 |  | -                'kernel.event_listener', | 
| 118 |  | -                [ | 
| 119 |  | -                    'event' => 'kernel.controller', | 
| 120 |  | -                    'method' => 'onKernelController', | 
| 121 |  | -                    'priority' => -1 | 
| 122 |  | -                ] | 
| 123 |  | -            ) | 
|  | 118 | +        ->tag( | 
|  | 119 | +            'kernel.event_listener', | 
|  | 120 | +            [ | 
|  | 121 | +                'event' => 'kernel.controller', | 
|  | 122 | +                'method' => 'onKernelController', | 
|  | 123 | +                'priority' => -1 | 
|  | 124 | +            ] | 
|  | 125 | +        ) | 
|  | 126 | + | 
|  | 127 | +        ->set('framework.title_listener', TitleListener::class) | 
|  | 128 | +        ->args([ | 
|  | 129 | +            service('framework.page_title'), | 
|  | 130 | +            service('framework.fallbacks'), | 
|  | 131 | +            service('router') | 
|  | 132 | +        ]) | 
|  | 133 | +        ->tag( | 
|  | 134 | +            'kernel.event_listener', | 
|  | 135 | +            [ | 
|  | 136 | +                'event' => 'kernel.controller', | 
|  | 137 | +                'method' => 'onKernelController', | 
|  | 138 | +                'priority' => -1 | 
|  | 139 | +            ] | 
|  | 140 | +        ) | 
|  | 141 | + | 
|  | 142 | +        /* | 
|  | 143 | +         * Page title | 
|  | 144 | +         */ | 
|  | 145 | +        ->set('framework.page_title', PageTitle::class) | 
|  | 146 | +        ->args([ | 
|  | 147 | +            service('framework.breadcrumb_trail'), | 
|  | 148 | +            service('framework.fallbacks'), | 
|  | 149 | +            service('translator') | 
|  | 150 | +        ]) | 
|  | 151 | +        ->alias(PageTitle::class, 'framework.page_title') | 
| 124 | 152 | 
 | 
| 125 | 153 |         /* | 
| 126 | 154 |          * Commands | 
| 127 | 155 |          */ | 
| 128 | 156 |         ->set(TranslateCommand::class) | 
| 129 |  | -            ->tag('console.command') | 
|  | 157 | +        ->tag('console.command') | 
| 130 | 158 | 
 | 
| 131 | 159 |         ->set(SecretsGetCommand::class) | 
| 132 |  | -            ->args([ | 
| 133 |  | -                service('secrets.vault') | 
| 134 |  | -            ]) | 
| 135 |  | -            ->tag('console.command'); | 
|  | 160 | +        ->args([ | 
|  | 161 | +            service('secrets.vault') | 
|  | 162 | +        ]) | 
|  | 163 | +        ->tag('console.command'); | 
| 136 | 164 | }; | 
0 commit comments