]> Raphaël G. Git Repositories - airbundle/blob - Resources/config/packages/rapsys_air.yaml
Add missing translations
[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 default controller
285 Rapsys\AirBundle\Controller\DefaultController:
286 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
287 tags: [ 'controller.service_arguments' ]
288 #Register location controller
289 Rapsys\AirBundle\Controller\LocationController:
290 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
291 tags: [ 'controller.service_arguments' ]
292 #Register user controller
293 Rapsys\AirBundle\Controller\UserController:
294 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
295 tags: [ 'controller.service_arguments' ]
296 #Register session controller
297 Rapsys\AirBundle\Controller\SessionController:
298 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
299 tags: [ 'controller.service_arguments' ]
300 #Register snippet controller
301 Rapsys\AirBundle\Controller\SnippetController:
302 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
303 tags: [ 'controller.service_arguments' ]
304 #Register error controller
305 Rapsys\AirBundle\Controller\ErrorController:
306 arguments: [ '@service_container', '@router', '@request_stack', '@translator' ]
307 tags: [ 'controller.service_arguments' ]
308 #Register locale event subscriber
309 Rapsys\AirBundle\EventSubscriber\LocaleSubscriber:
310 arguments: [ '@router', '%rapsys_air.locales%' ]
311 tags: [ 'kernel.event_subscriber' ]
312 #Register access denied handler
313 Rapsys\AirBundle\Security\AccessDeniedHandler:
314 arguments: [ '@service_container', '@twig', '@router', '@request_stack', '@translator' ]
315 #Register logout success handler
316 Rapsys\AirBundle\Security\LogoutSuccessHandler:
317 arguments: [ '@router' ]
318 #Register air fixtures
319 Rapsys\AirBundle\DataFixtures\AirFixtures:
320 tags: [ 'doctrine.fixture.orm' ]
321 #Replace assets packages
322 assets.packages:
323 class: 'Symfony\Component\Asset\Packages'
324 arguments: [ '@rapsys_pack.path_package' ]
325 # #Set version strategy
326 # assets.static_version_strategy:
327 # class: Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy
328 # arguments: [ 'x', '%%s?v=%%s' ]
329 Rapsys\AirBundle\Form\ApplicationType:
330 arguments: [ '@doctrine', '@translator' ]
331 tags: [ 'form.type' ]
332 Rapsys\AirBundle\Form\LocationType:
333 tags: [ 'form.type' ]
334 Rapsys\AirBundle\Form\SessionType:
335 arguments: [ '@doctrine' ]
336 tags: [ 'form.type' ]
337 Rapsys\AirBundle\Form\Extension\Type\HiddenEntityType:
338 arguments: [ '@doctrine' ]
339 tags: [ 'form.type' ]
340 Rapsys\AirBundle\Command\AttributeCommand:
341 arguments: [ '@doctrine' ]
342 tags: [ 'console.command' ]
343 Rapsys\AirBundle\Command\WeatherCommand:
344 arguments: [ '@doctrine' ]
345 tags: [ 'console.command' ]
346
347 #Twig Configuration
348 twig:
349 #Enforce debug
350 #debug: true
351 #auto_reload: ~
352 cache: false
353 #Fix form layout for css
354 #XXX: @RapsysAir is a shortcut to vendor/rapsys/airbundle/Resources/views directory here
355 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]
356 #Set twig paths
357 paths:
358 #Required by email.image(site_logo) directive
359 #XXX: Allow twig to resolve @RapsysAir/png/logo.png in vendor/rapsys/airbundle/Resources/public/png/logo.png
360 '%kernel.project_dir%/vendor/rapsys/airbundle/Resources/public': 'RapsysAir'
361 #Override default exception controller
362 #exception_controller: Rapsys\AirBundle\Controller\ErrorController::preview