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