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