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