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