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