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