]> Raphaël G. Git Repositories - airbundle/blob - Resources/config/packages/rapsysair.yaml
Import extension interface namespace
[airbundle] / Resources / config / packages / rapsysair.yaml
1 # RapsysAir configuration
2 rapsysair:
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 rapsysuser:
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: '%rapsysair.languages%'
26 locales: '%rapsysair.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: 'rapsysair'
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: '%rapsysair.contact.address%'
40 name: '%rapsysair.contact.name%'
41 # Context replacement
42 context:
43 copy: '%rapsysair.copy%'
44 icon: '%rapsysair.icon%'
45 logo: '%rapsysair.logo%'
46 root: '%rapsysair.root%'
47 title:
48 section: 'User'
49 site: '%rapsysair.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 # Map entities
133 # XXX: Entity short syntax was removed
134 # XXX: see https://github.com/doctrine/orm/issues/8818
135 RapsysAirBundle:
136 type: 'yml'
137 is_bundle: true
138 dir: 'Resources/config/doctrine'
139 prefix: 'Rapsys\AirBundle\Entity'
140 alias: 'RapsysAirBundle'
141
142 # Security configuration
143 security:
144 # Set password hashers
145 password_hashers:
146 # Rapsys\AirBundle\Entity\User: plaintext
147 Rapsys\AirBundle\Entity\User:
148 algorithm: 'bcrypt'
149
150 # Set providers
151 providers:
152 database:
153 entity:
154 class: 'Rapsys\AirBundle\Entity\User'
155 property: 'mail'
156
157 # Set firewall
158 firewalls:
159 # Disables authentication for assets and the profiler, adapt it according to your needs
160 dev:
161 pattern: '^/(_(profiler|wdt)|css|images|js)/'
162 security: false
163
164 main:
165 # Allow anonymous access
166 #anonymous: ~
167 #lazy: true
168
169 # Activate database provider
170 provider: 'database'
171
172 # XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
173 #http_basic: ~
174
175 # Set form login
176 # XXX: see https://symfony.com/doc/current/security/form_login_setup.html
177 # XXX: see https://symfony.com/doc/current/security/custom_authenticator.html
178 form_login:
179 # Redirect to referer if different from login route
180 use_referer: true
181 # Login path
182 login_path: 'rapsysuser_login'
183 # Check path
184 check_path: 'rapsysuser_login'
185 # Username parameter
186 username_parameter: 'login[mail]'
187 # Password parameter
188 password_parameter: 'login[password]'
189
190 # Set logout route
191 logout:
192 # Logout route
193 path: 'rapsysuser_logout'
194 # Logout default target
195 target: 'rapsysair'
196
197 # Set custom access denied handler
198 access_denied_handler: 'Rapsys\AirBundle\Handler\AccessDeniedHandler'
199
200 # Remember me
201 # XXX: see https://symfony.com/doc/current/security/remember_me.html
202 remember_me:
203 # Use APP_SECRET
204 secret: '%kernel.secret%'
205 # Always remember me
206 always_remember_me: true
207
208 # Set role hierarchy
209 role_hierarchy:
210 ROLE_GUEST: [ 'ROLE_USER' ]
211 ROLE_REGULAR: [ 'ROLE_USER', 'ROLE_GUEST' ]
212 ROLE_SENIOR: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR' ]
213 ROLE_ADMIN: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR', 'ROLE_SENIOR' ]
214
215 # Framework configuration
216 framework:
217 # Cache
218 cache:
219 # Memcache server
220 default_memcached_provider: 'memcached://localhost:11211'
221 # Cache pool
222 pools:
223 # Air cache
224 air.cache:
225 adapter: 'cache.adapter.memcached'
226 # User cache
227 user.cache:
228 adapter: 'cache.adapter.memcached'
229 default_locale: '%rapsysair.locale%'
230 disallow_search_engine_index: false
231 #error_controller: 'Rapsys\AirBundle\Controller\ErrorController::show'
232 # Append ip to mail headers
233 mailer:
234 headers:
235 X-Originating-IP: '%env(string:REMOTE_ADDR)%'
236 secret: '%env(string:APP_SECRET)%'
237 # Native session
238 session:
239 enabled: true
240 handler_id: ~
241 storage_factory_id: 'session.storage.factory.native'
242 cookie_secure: 'auto'
243 cookie_samesite: 'lax'
244 translator:
245 fallbacks: '%rapsysair.locales%'
246 validation:
247 email_validation_mode: 'html5'
248
249 # Service configuration
250 services:
251 # Register application controller
252 Rapsys\AirBundle\Controller\ApplicationController:
253 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
254 tags: [ 'controller.service_arguments' ]
255 # Register calendar controller
256 Rapsys\AirBundle\Controller\CalendarController:
257 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
258 tags: [ 'controller.service_arguments' ]
259 # Register default controller
260 Rapsys\AirBundle\Controller\DefaultController:
261 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
262 tags: [ 'controller.service_arguments' ]
263 # Register dance controller
264 Rapsys\AirBundle\Controller\DanceController:
265 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
266 tags: [ 'controller.service_arguments' ]
267 # Register location controller
268 Rapsys\AirBundle\Controller\LocationController:
269 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
270 tags: [ 'controller.service_arguments' ]
271 # Register user controller
272 Rapsys\AirBundle\Controller\UserController:
273 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', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
274 tags: [ 'controller.service_arguments' ]
275 # Register session controller
276 Rapsys\AirBundle\Controller\SessionController:
277 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
278 tags: [ 'controller.service_arguments' ]
279 # Register snippet controller
280 Rapsys\AirBundle\Controller\SnippetController:
281 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
282 tags: [ 'controller.service_arguments' ]
283 # Register error controller
284 Rapsys\AirBundle\Controller\ErrorController:
285 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
286 #arguments: [ '@service_container', '@router', '@translator' ]
287 tags: [ 'controller.service_arguments' ]
288 # Register access denied handler
289 Rapsys\AirBundle\Handler\AccessDeniedHandler:
290 arguments: [ '@security.authorization_checker', '@service_container', '@rapsysuser.access_decision_manager', '@doctrine', '@rapsysair.facebook_util', '@form.factory', '@rapsyspack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsyspack.map_util', '@rapsyspack.path_package', '@router', '@security.helper', '@rapsyspack.slugger_util', '@request_stack', '@translator', '@twig' ]
291 # Register air fixtures
292 Rapsys\AirBundle\DataFixtures\AirFixtures:
293 arguments: [ '@service_container', '@security.user_password_hasher' ]
294 tags: [ 'doctrine.fixture.orm' ]
295 # Register application form
296 Rapsys\AirBundle\Form\ApplicationType:
297 arguments: [ '@doctrine', '@translator' ]
298 tags: [ 'form.type' ]
299 # Register location form
300 Rapsys\AirBundle\Form\LocationType:
301 tags: [ 'form.type' ]
302 # Register session form
303 Rapsys\AirBundle\Form\SessionType:
304 arguments: [ '@doctrine' ]
305 tags: [ 'form.type' ]
306 # Register hidden entity form type
307 Rapsys\AirBundle\Form\Extension\Type\HiddenEntityType:
308 arguments: [ '@doctrine' ]
309 tags: [ 'form.type' ]
310 # Register contact form
311 Rapsys\AirBundle\Form\ContactType:
312 arguments: [ '@rapsyspack.image_util', '@rapsyspack.slugger_util', '@translator' ]
313 tags: [ 'form.type' ]
314 # Register register form
315 Rapsys\AirBundle\Form\RegisterType:
316 arguments: [ '@doctrine.orm.entity_manager' ]
317 tags: [ 'form.type' ]
318 # Register attribute command
319 Rapsys\AirBundle\Command\AttributeCommand:
320 arguments: [ '@doctrine' ]
321 tags: [ 'console.command' ]
322 # Register calendar command
323 Rapsys\AirBundle\Command\CalendarCommand:
324 arguments: [ '@doctrine', '@router', '@rapsyspack.slugger_util', '@translator', 'airlibre', 0, '%kernel.project_dir%/var/cache', '%kernel.default_locale%' ]
325 tags: [ 'console.command' ]
326 # Register calendar2 command
327 Rapsys\AirBundle\Command\Calendar2Command:
328 arguments: [ '@doctrine', '@router', '@rapsyspack.slugger_util', '@translator', '%kernel.default_locale%', '%env(string:GOOGLE_PROJECT)', '%env(string:GOOGLE_CLIENT)', '%env(string:GOOGLE_SECRET)' ]
329 tags: [ 'console.command' ]
330 # Register rekey command
331 Rapsys\AirBundle\Command\RekeyCommand:
332 arguments: [ '@doctrine' ]
333 tags: [ 'console.command' ]
334 # Register weather command
335 Rapsys\AirBundle\Command\WeatherCommand:
336 arguments: [ '@doctrine', '@filesystem' ]
337 tags: [ 'console.command' ]
338 # Register repository factory
339 Rapsys\AirBundle\Factory:
340 arguments: [ '@request_stack', '@router', '@rapsyspack.slugger_util', '@translator', '%kernel.default_locale%', '%rapsysair.languages%' ]
341 # Register facebook util service
342 rapsysair.facebook_util:
343 class: 'Rapsys\PackBundle\Util\FacebookUtil'
344 arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsyspack.path%', 'facebook', '%rapsysair.path%/png/facebook.png', { irishgrover: '%rapsysair.path%/ttf/irishgrover.v10.ttf', labelleaurore: '%rapsysair.path%/ttf/labelleaurore.v10.ttf', dejavusans: '%rapsysair.path%/ttf/dejavusans.2.37.ttf', droidsans: '%rapsysair.path%/ttf/droidsans.regular.ttf' } ]
345 public: true
346 # Register security password_hasher_factory as public
347 # XXX: required for command `php bin/console doctrine:`
348 security.password_hasher_factory:
349 class: 'Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory'
350 arguments: [ { 'Rapsys\AirBundle\Entity\User': { class: 'Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher', arguments: [ ~, ~, ~, '2y'] } } ]
351 public: true
352 # Register facebook event subscriber
353 Rapsys\PackBundle\Subscriber\FacebookSubscriber:
354 arguments: [ '@router', '%rapsysair.locales%' ]
355 tags: [ 'kernel.event_subscriber' ]
356 # Register dotenv:dump command
357 Symfony\Component\Dotenv\Command\DotenvDumpCommand: ~
358
359 # Twig Configuration
360 twig:
361 # Enforce debug
362 #auto_reload: ~
363 debug: '%kernel.debug%'
364 #strict_variables: '%kernel.debug%'
365
366 # Disable cache
367 # XXX: enable forced regeneration of css and js at each page load
368 cache: false
369
370 # Fix form layout for css
371 # XXX: @RapsysAir is a shortcut to vendor/rapsys/airbundle/Resources/views directory here
372 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]
373
374 # Set twig paths
375 paths:
376 # Required by email.image(site_logo) directive
377 # XXX: Allow twig to resolve @RapsysAir/png/logo.png in vendor/rapsys/airbundle/Resources/public/png/logo.png
378 '%kernel.project_dir%/vendor/rapsys/airbundle/Resources/public': 'RapsysAir'
379 # Override default exception controller
380 #exception_controller: Rapsys\AirBundle\Controller\ErrorController::preview