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