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