]> Raphaël G. Git Repositories - airbundle/blob - Resources/config/packages/rapsys_air.yaml
Add rapsys_air_about and rapsys_air_session_tangoargentin routes
[airbundle] / Resources / config / packages / rapsys_air.yaml
1 #RapsysAir configuration
2 rapsys_air:
3 #Contact
4 contact:
5 name: 'Raphaël Gertz'
6 mail: 'airlibre@rapsys.eu'
7
8 #RapsysUser configuration
9 rapsys_user:
10 #Class replacement
11 class:
12 group: 'Rapsys\AirBundle\Entity\Group'
13 civility: 'Rapsys\AirBundle\Entity\Civility'
14 user: 'Rapsys\AirBundle\Entity\User'
15 #Default replacement
16 default:
17 group: [ 'User' ]
18 civility: 'Mister'
19 #Route replacement
20 route:
21 index:
22 name: 'rapsys_air'
23 #Translate replacement
24 translate: [ 'title', 'site.title', 'copy.by', 'copy.long', 'copy.short' ]
25 #Languages replacement
26 languages:
27 en: 'English'
28 fr: 'French'
29 #Contact replacement
30 contact:
31 name: '%rapsys_air.contact.name%'
32 mail: '%rapsys_air.contact.mail%'
33 #Login replacement
34 login:
35 route:
36 index: 'site.url'
37 view:
38 name: '@RapsysAir/form/login.html.twig'
39 context:
40 title: 'Login'
41 copy:
42 by: '%rapsys_air.copy.by%'
43 link: '%rapsys_air.copy.link%'
44 long: '%rapsys_air.copy.long%'
45 short: '%rapsys_air.copy.short%'
46 title: '%rapsys_air.copy.title%'
47 site:
48 ico: '%rapsys_air.site.ico%'
49 logo: '%rapsys_air.site.logo%'
50 png: '%rapsys_air.site.png%'
51 svg: '%rapsys_air.site.svg%'
52 title: '%rapsys_air.site.title%'
53 url: '%rapsys_air.site.url%'
54 #Recover replacement
55 recover:
56 route:
57 index: 'site.url'
58 recover_mail: 'recover_url'
59 view:
60 name: '@RapsysAir/form/recover.html.twig'
61 context:
62 title: 'Recover'
63 copy:
64 by: '%rapsys_air.copy.by%'
65 link: '%rapsys_air.copy.link%'
66 long: '%rapsys_air.copy.long%'
67 short: '%rapsys_air.copy.short%'
68 title: '%rapsys_air.copy.title%'
69 site:
70 ico: '%rapsys_air.site.ico%'
71 logo: '%rapsys_air.site.logo%'
72 png: '%rapsys_air.site.png%'
73 svg: '%rapsys_air.site.svg%'
74 title: '%rapsys_air.site.title%'
75 url: '%rapsys_air.site.url%'
76 mail:
77 subject: 'Welcome back %%recipient_name%% to %%site.title%%'
78 html: '@RapsysAir/mail/recover.html.twig'
79 text: '@RapsysAir/mail/recover.text.twig'
80 context:
81 #Mail recover replacement
82 recover_mail:
83 route:
84 index: 'site.url'
85 recover_mail: 'recover_url'
86 view:
87 name: '@RapsysAir/form/recover_mail.html.twig'
88 context:
89 title: 'Mail recover'
90 copy:
91 by: '%rapsys_air.copy.by%'
92 link: '%rapsys_air.copy.link%'
93 long: '%rapsys_air.copy.long%'
94 short: '%rapsys_air.copy.short%'
95 title: '%rapsys_air.copy.title%'
96 site:
97 ico: '%rapsys_air.site.ico%'
98 logo: '%rapsys_air.site.logo%'
99 png: '%rapsys_air.site.png%'
100 svg: '%rapsys_air.site.svg%'
101 title: '%rapsys_air.site.title%'
102 url: '%rapsys_air.site.url%'
103 mail:
104 subject: 'Welcome back %%recipient_name%% to %%site.title%%'
105 html: '@RapsysAir/mail/recover_mail.html.twig'
106 text: '@RapsysAir/mail/recover_mail.text.twig'
107 context:
108 #Register replacement
109 register:
110 route:
111 index: 'site.url'
112 view:
113 form: 'Rapsys\AirBundle\Form\RegisterType'
114 name: '@RapsysAir/form/register.html.twig'
115 context:
116 title: 'Register'
117 copy:
118 by: '%rapsys_air.copy.by%'
119 link: '%rapsys_air.copy.link%'
120 long: '%rapsys_air.copy.long%'
121 short: '%rapsys_air.copy.short%'
122 title: '%rapsys_air.copy.title%'
123 site:
124 ico: '%rapsys_air.site.ico%'
125 logo: '%rapsys_air.site.logo%'
126 png: '%rapsys_air.site.png%'
127 svg: '%rapsys_air.site.svg%'
128 title: '%rapsys_air.site.title%'
129 url: '%rapsys_air.site.url%'
130 mail:
131 subject: 'Welcome %%recipient_name%% to %%site.title%%'
132 html: '@RapsysAir/mail/register.html.twig'
133 text: '@RapsysAir/mail/register.text.twig'
134 context:
135
136 #Doctrine configuration
137 doctrine:
138 #Dbal configuration
139 dbal:
140 mapping_types:
141 enum: string
142 #Orm configuration
143 orm:
144 #Force resolution of UserBundle entities to AirBundle one
145 #XXX: without these lines, relations are lookup in parent namespace ignoring AirBundle extension
146 resolve_target_entities:
147 Rapsys\UserBundle\Entity\Group: Rapsys\AirBundle\Entity\Group
148 Rapsys\UserBundle\Entity\Civility: Rapsys\AirBundle\Entity\Civility
149 Rapsys\UserBundle\Entity\User: Rapsys\AirBundle\Entity\User
150
151 #Security configuration
152 security:
153 #Set encoders
154 encoders:
155 #Rapsys\AirBundle\Entity\User: plaintext
156 Rapsys\AirBundle\Entity\User:
157 algorithm: 'bcrypt'
158
159 #Set providers
160 providers:
161 database:
162 entity:
163 class: Rapsys\AirBundle\Entity\User
164 property: mail
165
166 #Set firewall
167 firewalls:
168 #Disables authentication for assets and the profiler, adapt it according to your needs
169 dev:
170 pattern: ^/(_(profiler|wdt)|css|images|js)/
171 security: false
172
173 main:
174 #Allow anonymous access
175 anonymous: ~
176
177 #Disable logout on user change
178 logout_on_user_change: true
179
180 #Activate database provider
181 provider: database
182
183 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
184 #http_basic: ~
185
186 #Set form login
187 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
188 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
189 form_login:
190 use_referer: true
191 login_path: rapsys_user_login
192 check_path: rapsys_user_login
193 username_parameter: 'login[mail]'
194 password_parameter: 'login[password]'
195
196 #Set logout route
197 logout:
198 path: rapsys_user_logout
199 #XXX: see https://symfony.com/doc/current/security.html#logging-out
200 success_handler: Rapsys\AirBundle\Security\LogoutSuccessHandler
201 #target: /
202
203 #Set custom access denied handler
204 access_denied_handler: Rapsys\AirBundle\Security\AccessDeniedHandler
205
206 #Set role hierarchy
207 role_hierarchy:
208 ROLE_GUEST: [ 'ROLE_USER' ]
209 ROLE_REGULAR: [ 'ROLE_USER', 'ROLE_GUEST' ]
210 ROLE_SENIOR: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR' ]
211 ROLE_ADMIN: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR', 'ROLE_SENIOR' ]
212
213 #Framework configuration
214 framework:
215 default_locale: 'fr'
216 #error_controller: 'Rapsys\AirBundle\Controller\ErrorController::show'
217 translator:
218 fallbacks: [ 'fr', 'en' ]
219 session:
220 enabled: true
221 handler_id: ~
222 cookie_secure: 'auto'
223 cookie_samesite: 'lax'
224 disallow_search_engine_index: false
225 #framework:
226 # error_controller: Rapsys\AirBundle\Controller\ErrorController::show
227 #
228 # #Assets configuration
229 # XXX: don't use that shit, it breaks assets._default_package url generation
230 # assets:
231 # #Set default base path
232 # #base_path: '/bundles/%%s'
233 # #Set default version
234 # version: 'x'
235 # #Set default format
236 # version_format: '%%s?v=%%s'
237 #
238 # packages:
239 # pack:
240 # base_path: '/bundles/%%s'
241
242 #Service configuration
243 services:
244 #Register twig file_get_contents extension
245 #XXX: obsolete by email.image twig filter in "twig/extensions" or "twig/html-extra"
246 rapsys_air.twig.file_get_contents:
247 class: 'Rapsys\AirBundle\Twig\FileGetContentsExtension'
248 tags: [ 'twig.extension' ]
249 #Register twig base64 extension
250 rapsys_air.twig.base64:
251 class: 'Rapsys\AirBundle\Twig\Base64Extension'
252 tags: [ 'twig.extension' ]
253 #Register twig bb2html extension
254 rapsys_air.twig.bb2html:
255 class: 'Rapsys\AirBundle\Twig\Bb2htmlExtension'
256 tags: [ 'twig.extension' ]
257 #Register twig intl extension
258 #XXX: https://www.php.net/manual/en/class.intldateformatter.php
259 #XXX: https://stackoverflow.com/questions/25948853/how-to-install-the-intl-extension-for-twig
260 rapsys_air.twig.intl:
261 class: 'Twig\Extensions\IntlExtension'
262 tags: [ 'twig.extension' ]
263 #new TwigFilter('markdown_to_html', ['Twig\\Extra\\Markdown\\MarkdownRuntime', 'convert'], ['is_safe' => ['all']]),
264 #new TwigFilter('html_to_markdown', 'Twig\\Extra\\Markdown\\twig_html_to_markdown', ['is_safe' => ['all']]),
265 #Register twig markdown_to_html extension
266 # #class: 'Twig\Extra\Markdown\DefaultMarkdown'
267 #rapsys_air.twig.markdown_eruse:
268 # class: 'Twig\Extra\Markdown\DefaultMarkdown'
269 #rapsys_air.twig.markdown_runtime:
270 # class: 'Twig\Extra\Markdown\MarkdownRuntime'
271 # arguments: [ '@rapsys_air.twig.markdown_eruse' ]
272 #rapsys_air.markdown:
273 # class: 'Twig\Extra\Markdown\MarkdownExtension'
274 # tags: [ 'twig.extension' ]
275 #Register twig pack extension
276 #rapsys_pack.pack_extension:
277 # class: 'Rapsys\PackBundle\Twig\PackExtension'
278 # arguments: [ '@file_locator', '@service_container', '@rapsys_pack.path_package' ]
279 # tags: [ 'twig.extension' ]
280 #Register application controller
281 Rapsys\AirBundle\Controller\ApplicationController:
282 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
283 tags: [ 'controller.service_arguments' ]
284 #Register calendar controller
285 Rapsys\AirBundle\Controller\CalendarController:
286 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
287 tags: [ 'controller.service_arguments' ]
288 #Register default controller
289 Rapsys\AirBundle\Controller\DefaultController:
290 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
291 tags: [ 'controller.service_arguments' ]
292 #Register location controller
293 Rapsys\AirBundle\Controller\LocationController:
294 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
295 tags: [ 'controller.service_arguments' ]
296 #Register user controller
297 Rapsys\AirBundle\Controller\UserController:
298 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
299 tags: [ 'controller.service_arguments' ]
300 #Register session controller
301 Rapsys\AirBundle\Controller\SessionController:
302 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
303 tags: [ 'controller.service_arguments' ]
304 #Register snippet controller
305 Rapsys\AirBundle\Controller\SnippetController:
306 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
307 tags: [ 'controller.service_arguments' ]
308 #Register error controller
309 Rapsys\AirBundle\Controller\ErrorController:
310 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
311 tags: [ 'controller.service_arguments' ]
312 #Register locale event subscriber
313 Rapsys\AirBundle\EventSubscriber\LocaleSubscriber:
314 arguments: [ '@router', '%rapsys_air.locales%' ]
315 tags: [ 'kernel.event_subscriber' ]
316 #Register access denied handler
317 Rapsys\AirBundle\Security\AccessDeniedHandler:
318 arguments: [ '@service_container', '@twig', '@router', '@request_stack', '@translator' ]
319 #Register logout success handler
320 Rapsys\AirBundle\Security\LogoutSuccessHandler:
321 arguments: [ '@router' ]
322 #Register air fixtures
323 Rapsys\AirBundle\DataFixtures\AirFixtures:
324 tags: [ 'doctrine.fixture.orm' ]
325 #Replace assets packages
326 assets.packages:
327 class: 'Symfony\Component\Asset\Packages'
328 arguments: [ '@rapsys_pack.path_package' ]
329 # #Set version strategy
330 # assets.static_version_strategy:
331 # class: Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy
332 # arguments: [ 'x', '%%s?v=%%s' ]
333 Rapsys\AirBundle\Form\ApplicationType:
334 arguments: [ '@doctrine', '@translator' ]
335 tags: [ 'form.type' ]
336 Rapsys\AirBundle\Form\LocationType:
337 tags: [ 'form.type' ]
338 Rapsys\AirBundle\Form\SessionType:
339 arguments: [ '@doctrine' ]
340 tags: [ 'form.type' ]
341 Rapsys\AirBundle\Form\Extension\Type\HiddenEntityType:
342 arguments: [ '@doctrine' ]
343 tags: [ 'form.type' ]
344 Rapsys\AirBundle\Command\AttributeCommand:
345 arguments: [ '@doctrine' ]
346 tags: [ 'console.command' ]
347 Rapsys\AirBundle\Command\CalendarCommand:
348 arguments: [ '@service_container', '@doctrine', '@router', '@translator' ]
349 tags: [ 'console.command' ]
350 Rapsys\AirBundle\Command\WeatherCommand:
351 arguments: [ '@doctrine' ]
352 tags: [ 'console.command' ]
353
354 #Twig Configuration
355 twig:
356 #Enforce debug
357 #debug: true
358 #auto_reload: ~
359 cache: false
360 #Fix form layout for css
361 #XXX: @RapsysAir is a shortcut to vendor/rapsys/airbundle/Resources/views directory here
362 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]
363 #Set twig paths
364 paths:
365 #Required by email.image(site_logo) directive
366 #XXX: Allow twig to resolve @RapsysAir/png/logo.png in vendor/rapsys/airbundle/Resources/public/png/logo.png
367 '%kernel.project_dir%/vendor/rapsys/airbundle/Resources/public': 'RapsysAir'
368 #Override default exception controller
369 #exception_controller: Rapsys\AirBundle\Controller\ErrorController::preview