]> Raphaël G. Git Repositories - airbundle/blob - Resources/config/packages/rapsys_air.yaml
Add location_date_begin_length_slot candidate index
[airbundle] / Resources / config / packages / rapsys_air.yaml
1 #RapsysAir configuration
2 rapsys_air:
3 #Contact
4 contact:
5 name: 'Raphaël Gertz'
6 mail: 'airlibre@rapsys.eu'
7 #Copyright
8 copy:
9 long: 'Raphaël Gertz all rights reserved'
10 short: 'Copyright 2019'
11
12 #RapsysUser configuration
13 rapsys_user:
14 #Class replacement
15 class:
16 group: 'Rapsys\AirBundle\Entity\Group'
17 title: 'Rapsys\AirBundle\Entity\Title'
18 user: 'Rapsys\AirBundle\Entity\User'
19 #Default replacement
20 default:
21 group: [ 'Senior' ]
22 title: 'Mister'
23 #Route replacement
24 route:
25 index:
26 name: 'rapsys_air'
27 #Contact replacement
28 contact:
29 name: '%rapsys_air.contact.name%'
30 mail: '%rapsys_air.contact.mail%'
31 #Login replacement
32 login:
33 route:
34 index: 'site_url'
35 view:
36 name: '@RapsysAir/form/login.html.twig'
37 context:
38 title: 'Login'
39 copy_long: '%rapsys_air.copy.long%'
40 copy_short: '%rapsys_air.copy.short%'
41 site_ico: '%rapsys_air.site.ico%'
42 site_logo: '%rapsys_air.site.logo%'
43 site_png: '%rapsys_air.site.png%'
44 site_svg: '%rapsys_air.site.svg%'
45 site_title: '%rapsys_air.site.title%'
46 #Recover replacement
47 recover:
48 route:
49 index: 'site_url'
50 recover_mail: 'recover_url'
51 view:
52 name: '@RapsysAir/form/recover.html.twig'
53 context:
54 title: 'Recover'
55 copy_long: '%rapsys_air.copy.long%'
56 copy_short: '%rapsys_air.copy.short%'
57 site_ico: '%rapsys_air.site.ico%'
58 site_logo: '%rapsys_air.site.logo%'
59 site_png: '%rapsys_air.site.png%'
60 site_svg: '%rapsys_air.site.svg%'
61 site_title: '%rapsys_air.site.title%'
62 mail:
63 subject: '%%recipient_name%% welcome back to %%site_title%%'
64 html: '@RapsysAir/mail/recover.html.twig'
65 text: '@RapsysAir/mail/recover.text.twig'
66 context:
67 #Mail recover replacement
68 recover_mail:
69 route:
70 index: 'site_url'
71 recover_mail: 'recover_url'
72 view:
73 name: '@RapsysAir/form/recover_mail.html.twig'
74 context:
75 title: 'Mail recover'
76 copy_long: '%rapsys_air.copy.long%'
77 copy_short: '%rapsys_air.copy.short%'
78 site_ico: '%rapsys_air.site.ico%'
79 site_logo: '%rapsys_air.site.logo%'
80 site_png: '%rapsys_air.site.png%'
81 site_svg: '%rapsys_air.site.svg%'
82 site_title: '%rapsys_air.site.title%'
83 mail:
84 subject: '%%recipient_name%% welcome back to %%site_title%%'
85 html: '@RapsysAir/mail/recover_mail.html.twig'
86 text: '@RapsysAir/mail/recover_mail.text.twig'
87 context:
88 #Register replacement
89 register:
90 route:
91 index: 'site_url'
92 view:
93 form: 'Rapsys\AirBundle\Form\RegisterType'
94 name: '@RapsysAir/form/register.html.twig'
95 context:
96 title: 'Register'
97 copy_long: '%rapsys_air.copy.long%'
98 copy_short: '%rapsys_air.copy.short%'
99 site_ico: '%rapsys_air.site.ico%'
100 site_logo: '%rapsys_air.site.logo%'
101 site_png: '%rapsys_air.site.png%'
102 site_svg: '%rapsys_air.site.svg%'
103 site_title: '%rapsys_air.site.title%'
104 mail:
105 subject: '%%recipient_name%% welcome 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 #Orm configuration
113 orm:
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\Title: Rapsys\AirBundle\Entity\Title
119 Rapsys\UserBundle\Entity\User: Rapsys\AirBundle\Entity\User
120
121 #Security configuration
122 security:
123 #Set encoders
124 encoders:
125 #Rapsys\AirBundle\Entity\User: plaintext
126 Rapsys\AirBundle\Entity\User:
127 algorithm: 'bcrypt'
128
129 #Set providers
130 providers:
131 database:
132 entity:
133 class: Rapsys\AirBundle\Entity\User
134 property: mail
135
136 #Set firewall
137 firewalls:
138 #Disables authentication for assets and the profiler, adapt it according to your needs
139 dev:
140 pattern: ^/(_(profiler|wdt)|css|images|js)/
141 security: false
142
143 main:
144 #Allow anonymous access
145 anonymous: ~
146
147 #Disable logout on user change
148 logout_on_user_change: true
149
150 #Activate database provider
151 provider: database
152
153 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
154 #http_basic: ~
155
156 #Set form login
157 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
158 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
159 form_login:
160 use_referer: true
161 login_path: rapsys_user_login
162 check_path: rapsys_user_login
163 username_parameter: 'login[mail]'
164 password_parameter: 'login[password]'
165
166 #Set logout route
167 logout:
168 path: rapsys_user_logout
169 #XXX: see https://symfony.com/doc/current/security.html#logging-out
170 success_handler: Rapsys\AirBundle\Security\LogoutSuccessHandler
171 #target: /
172
173 #Set custom access denied handler
174 access_denied_handler: Rapsys\AirBundle\Security\AccessDeniedHandler
175
176 #Set role hierarchy
177 role_hierarchy:
178 ROLE_GUEST: [ 'ROLE_USER' ]
179 ROLE_REGULAR: [ 'ROLE_USER', 'ROLE_GUEST' ]
180 ROLE_SENIOR: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR' ]
181 ROLE_ADMIN: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR', 'ROLE_SENIOR' ]
182
183 #Framework configuration
184 framework:
185 default_locale: 'fr'
186 translator:
187 fallbacks: [ 'fr', 'en' ]
188 session:
189 enabled: true
190 handler_id: ~
191 cookie_secure: 'auto'
192 cookie_samesite: 'lax'
193 disallow_search_engine_index: false
194 #framework:
195 # error_controller: Rapsys\AirBundle\Controller\ErrorController::show
196 #
197 # #Assets configuration
198 # XXX: don't use that shit, it breaks assets._default_package url generation
199 # assets:
200 # #Set default base path
201 # #base_path: '/bundles/%%s'
202 # #Set default version
203 # version: 'x'
204 # #Set default format
205 # version_format: '%%s?v=%%s'
206 #
207 # packages:
208 # pack:
209 # base_path: '/bundles/%%s'
210
211 #Service configuration
212 services:
213 #Register twig file_get_contents extension
214 #XXX: obsolete by email.image twig filter in "twig/extensions" or "twig/html-extra"
215 rapsys_air.twig.file_get_contents:
216 class: 'Rapsys\AirBundle\Twig\FileGetContentsExtension'
217 tags: [ 'twig.extension' ]
218 #Register twig base64 extension
219 rapsys_air.twig.base64:
220 class: 'Rapsys\AirBundle\Twig\Base64Extension'
221 tags: [ 'twig.extension' ]
222 #Register twig bb2html extension
223 rapsys_air.twig.bb2html:
224 class: 'Rapsys\AirBundle\Twig\Bb2htmlExtension'
225 tags: [ 'twig.extension' ]
226 #Register default controller
227 Rapsys\AirBundle\Controller\DefaultController:
228 arguments: [ '@service_container', '@router', '@rapsys_user.slugger', '@translator' ]
229 tags: [ 'controller.service_arguments' ]
230 #Register location controller
231 Rapsys\AirBundle\Controller\LocationController:
232 arguments: [ '@service_container', '@router', '@rapsys_user.slugger', '@translator' ]
233 tags: [ 'controller.service_arguments' ]
234 #Register session controller
235 Rapsys\AirBundle\Controller\SessionController:
236 arguments: [ '@service_container', '@router', '@rapsys_user.slugger', '@translator' ]
237 tags: [ 'controller.service_arguments' ]
238 #Register application controller
239 Rapsys\AirBundle\Controller\ApplicationController:
240 arguments: [ '@service_container', '@router', '@rapsys_user.slugger', '@translator' ]
241 tags: [ 'controller.service_arguments' ]
242 #Register user controller
243 Rapsys\AirBundle\Controller\UserController:
244 arguments: [ '@service_container', '@router', '@rapsys_user.slugger', '@translator' ]
245 tags: [ 'controller.service_arguments' ]
246 #Register error controller
247 # Rapsys\AirBundle\Controller\ErrorController:
248 # arguments: [ '@service_container', '@router', '@rapsys_user.slugger', '@translator' ]
249 # tags: [ 'controller.service_arguments' ]
250 #Register locale event subscriber
251 Rapsys\AirBundle\EventSubscriber\LocaleSubscriber:
252 arguments: [ '@router', '%rapsys_air.locales%' ]
253 tags: [ 'kernel.event_subscriber' ]
254 #Register access denied handler
255 Rapsys\AirBundle\Security\AccessDeniedHandler:
256 arguments: [ '@service_container', '@twig', '@router', '@translator' ]
257 #Register logout success handler
258 Rapsys\AirBundle\Security\LogoutSuccessHandler:
259 arguments: [ '@router' ]
260 #Register air fixtures
261 Rapsys\AirBundle\DataFixtures\AirFixtures:
262 tags: [ 'doctrine.fixture.orm' ]
263 #Replace assets packages
264 assets.packages:
265 class: 'Symfony\Component\Asset\Packages'
266 arguments: [ '@rapsys_pack.path_package' ]
267 # #Set version strategy
268 # assets.static_version_strategy:
269 # class: Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy
270 # arguments: [ 'x', '%%s?v=%%s' ]
271 Rapsys\AirBundle\Form\ApplicationType:
272 arguments: [ '@doctrine', '@translator' ]
273 tags: [ 'form.type' ]
274 Rapsys\AirBundle\Form\SessionEditType:
275 arguments: [ '@doctrine' ]
276 tags: [ 'form.type' ]
277 Rapsys\AirBundle\Command\AttributeCommand:
278 arguments: [ '@doctrine' ]
279 tags: [ 'console.command' ]
280 Rapsys\AirBundle\Command\WeatherCommand:
281 arguments: [ '@doctrine' ]
282 tags: [ 'console.command' ]
283
284 #Twig Configuration
285 twig:
286 #Enforce debug
287 debug: true
288 auto_reload: ~
289 cache: false
290 #Fix form layout for css
291 #XXX: @RapsysAir is a shortcut to vendor/rapsys/airbundle/Resources/views directory here
292 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]
293 #Set twig paths
294 paths:
295 #Required by email.image(site_logo) directive
296 #XXX: Allow twig to resolve @RapsysAir/png/logo.png in vendor/rapsys/airbundle/Resources/public/png/logo.png
297 '%kernel.project_dir%/vendor/rapsys/airbundle/Resources/public': 'RapsysAir'
298 #Override default exception controller
299 #exception_controller: Rapsys\AirBundle\Controller\ErrorController::preview