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