]> Raphaël G. Git Repositories - blogbundle/blob - Resources/config/packages/rapsys_blog.yaml
Add form styles
[blogbundle] / Resources / config / packages / rapsys_blog.yaml
1 # Dev log configuration
2 #TODO: set mail, calendar and facebook app id as env variables ???
3 rapsys_blog:
4 contact:
5 address: 'blog@rapsys.eu'
6 name: 'Raphaël Gertz'
7 copy:
8 by: 'Rapsys'
9 link: 'https://rapsys.eu'
10 long: 'All rights reserved'
11 short: 'Copyright 2019-2023'
12 title: 'By Raphaël'
13 donate: 'https://paypal.me/milongaraphael'
14 facebook:
15 #TODO: set this as env variables ???
16 apps: [ 3728770287223690 ]
17 height: 630
18 width: 1200
19 icon:
20 ico: '@RapsysBlog/ico/icon.ico'
21 png:
22 # Default
23 256: '@RapsysBlog/png/icon.256.png'
24
25 # For google
26 # Chrome for Android home screen icon
27 196: '@RapsysBlog/png/icon.196.png'
28 # Google Developer Web App Manifest Recommendation
29 192: '@RapsysBlog/png/icon.192.png'
30 # Chrome Web Store icon
31 128: '@RapsysBlog/png/icon.128.png'
32
33 # Fallback
34 32: '@RapsysBlog/png/icon.32.png'
35
36 # For apple
37 # XXX: old obsolete format: [57, 72, 76, 114, 120, 144]
38 # XXX: see https://webhint.io/docs/user-guide/hints/hint-apple-touch-icons/
39 # XXX: see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
40 # iPhone Retina
41 180: '@RapsysBlog/png/icon.180.png'
42 # iPad Retina touch icon
43 167: '@RapsysBlog/png/icon.167.png'
44 # iPad touch icon
45 152: '@RapsysBlog/png/icon.152.png'
46 # iOS7
47 120: '@RapsysBlog/png/icon.120.png'
48
49 # For windows
50 # XXX: see https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn255024(v=vs.85)
51 310: '@RapsysBlog/png/icon.310.png'
52 150: '@RapsysBlog/png/icon.150.png'
53 70: '@RapsysBlog/png/icon.70.png'
54 svg: '@RapsysBlog/svg/icon.svg'
55 languages:
56 en_gb: 'English'
57 fr_fr: 'French'
58 locale: 'fr_fr'
59 locales: [ 'fr_fr', 'en_gb' ]
60 logo:
61 alt: 'Rapsys'' dev log logo'
62 png: '@RapsysBlog/png/logo.png'
63 svg: '@RapsysBlog/svg/logo.svg'
64 root: 'rapsys_blog'
65 title: 'Rapsys'' dev log'
66
67 #RapsysUser configuration
68 rapsys_user:
69 #Class replacement
70 class:
71 group: 'Rapsys\BlogBundle\Entity\Group'
72 civility: 'Rapsys\BlogBundle\Entity\Civility'
73 user: 'Rapsys\BlogBundle\Entity\User'
74 #Default replacement
75 default:
76 admin: 'ROLE_ADMIN'
77 civility: 'Mister'
78 group: [ 'User' ]
79 #Route replacement
80 route:
81 index:
82 name: 'rapsys_blog'
83 register:
84 name: 'rapsys_user_register'
85 #Translate replacement
86 translate: [ 'title', 'password', 'copy.by', 'copy.long', 'copy.short', 'copy.title', 'head.logo.alt', 'head.site' ]
87 #Languages replacement
88 languages: '%rapsys_blog.languages%'
89 #Contact replacement
90 contact: '%rapsys_blog.contact%'
91 #Context replacement
92 context:
93 copy: '%rapsys_blog.copy%'
94 head:
95 icon: '%rapsys_blog.icon%'
96 logo: '%rapsys_blog.logo%'
97 root: '%rapsys_blog.root%'
98 site: '%rapsys_blog.title%'
99 #Edit replacement
100 edit:
101 #field:
102 #mail: false
103 #password: false
104 #pseudonym: false
105 #slug: false
106 route:
107 index: 'root'
108 view:
109 edit: 'Rapsys\BlogBundle\Form\EditType'
110 name: '@RapsysBlog/form/edit.html.twig'
111 context:
112 title: 'Modify account'
113 password: 'Modify password'
114 #Index replacement
115 index:
116 route:
117 index: 'root'
118 view:
119 name: '@RapsysBlog/user/index.html.twig'
120 context:
121 title: 'User list'
122 #Login replacement
123 login:
124 route:
125 index: 'root'
126 view:
127 name: '@RapsysBlog/form/login.html.twig'
128 context:
129 title: 'Login'
130 #Recover replacement
131 recover:
132 route:
133 index: 'root'
134 recover: 'recover_url'
135 view:
136 name: '@RapsysBlog/form/recover.html.twig'
137 context:
138 title: 'Recover'
139 mail:
140 subject: 'Welcome back %%recipient_name%% to %%head.site%%'
141 html: '@RapsysBlog/mail/recover.html.twig'
142 text: '@RapsysBlog/mail/recover.text.twig'
143 context:
144 #Register replacement
145 register:
146 field:
147 pseudonym: false
148 slug: false
149 route:
150 index: 'root'
151 confirm: 'confirm_url'
152 view:
153 form: 'Rapsys\BlogBundle\Form\RegisterType'
154 name: '@RapsysBlog/form/register.html.twig'
155 context:
156 title: 'Register'
157 mail:
158 subject: 'Welcome %%recipient_name%% to %%head.site%%'
159 html: '@RapsysBlog/mail/register.html.twig'
160 text: '@RapsysBlog/mail/register.text.twig'
161 context:
162
163 # Doctrine configuration
164 doctrine:
165 # Orm configuration
166 orm:
167 # Replace repository factory
168 repository_factory: 'Rapsys\BlogBundle\Factory\RepositoryFactory'
169
170 #Force resolution of UserBundle entities to BlogBundle one
171 #XXX: without these lines, relations are lookup in parent namespace ignoring BlogBundle extension
172 resolve_target_entities:
173 Rapsys\UserBundle\Entity\Group: 'Rapsys\BlogBundle\Entity\Group'
174 Rapsys\UserBundle\Entity\Civility: 'Rapsys\BlogBundle\Entity\Civility'
175 Rapsys\UserBundle\Entity\User: 'Rapsys\BlogBundle\Entity\User'
176
177 # Framework configuration
178 framework:
179 default_locale: '%rapsys_blog.locale%'
180 disallow_search_engine_index: false
181 #error_controller: 'Rapsys\BlogBundle\Controller\ErrorController::show'
182 mailer:
183 headers:
184 X-Originating-IP: '%env(REMOTE_ADDR)%'
185 secret: '%env(APP_SECRET)%'
186 csrf_protection: true
187 session:
188 enabled: true
189 handler_id: ~
190 storage_factory_id: 'session.storage.factory.native'
191 cookie_secure: 'auto'
192 cookie_samesite: 'lax'
193 translator:
194 fallbacks: '%rapsys_blog.locales%'
195
196 # Security configuration
197 security:
198 # Set password hashers
199 password_hashers:
200 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
201 #TODO: see https://symfony.com/doc/current/security/passwords.html (sodium ? + upgrade)
202 Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
203 #Rapsys\BlogBundle\Entity\User:
204 algorithm: 'sodium'
205 migrate_from:
206 - 'bcrypt'
207 - 'plaintext'
208
209 # Set providers
210 providers:
211 database:
212 entity:
213 class: Rapsys\BlogBundle\Entity\User
214 property: mail
215
216 # Set firewall
217 firewalls:
218 # Disables authentication for assets and the profiler, adapt it according to your needs
219 dev:
220 pattern: ^/(_(profiler|wdt)|css|images|js)/
221 security: false
222
223 main:
224 # Allow anonymous access
225 #anonymous: ~
226 #lazy: true
227
228 # Activate database provider
229 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
230 provider: database
231
232 # Activate user checker
233 user_checker: 'security.user_checker'
234
235 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
236 #http_basic: ~
237
238 # Set form login
239 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
240 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
241 form_login:
242 # Redirect to referer if different from login route
243 use_referer: true
244 # Login path
245 login_path: rapsys_user_login
246 # Check path
247 check_path: rapsys_user_login
248 # Username parameter
249 username_parameter: 'login[mail]'
250 # Password parameter
251 password_parameter: 'login[password]'
252 # Enable login csrf protection
253 enable_csrf: false
254 # Csrf parameter
255 csrf_parameter: 'login[_token]'
256 # Csrf id
257 csrf_token_id: 'login'
258
259 # Set logout route
260 logout:
261 # Logout route
262 path: rapsys_user_logout
263 # Logout default target
264 target: rapsys_blog
265
266 # Set custom access denied handler
267 #access_denied_handler: Rapsys\BlogBundle\Handler\AccessDeniedHandler
268
269 # Remember me
270 #XXX: see https://symfony.com/doc/current/security/remember_me.html
271 remember_me:
272 # Use APP_SECRET
273 secret: '%kernel.secret%'
274 # Always remember me
275 always_remember_me: true
276
277 # Set role hierarchy
278 role_hierarchy:
279 ROLE_USER: [ 'ROLE_GUEST' ]
280 ROLE_ADMIN: [ 'ROLE_GUEST', 'ROLE_USER' ]
281
282 #Service configuration
283 services:
284 #Register abstract controller
285 Rapsys\BlogBundle\Controller\AbstractController:
286 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@security.helper', '@request_stack', '@translator', '@twig' ]
287 tags: [ 'controller.service_arguments' ]
288 #Register article controller
289 Rapsys\BlogBundle\Controller\ArticleController:
290 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@security.helper', '@request_stack', '@translator', '@twig' ]
291 tags: [ 'controller.service_arguments' ]
292 #Register default controller
293 Rapsys\BlogBundle\Controller\DefaultController:
294 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@security.helper', '@request_stack', '@translator', '@twig' ]
295 tags: [ 'controller.service_arguments' ]
296 #Register keyword controller
297 Rapsys\BlogBundle\Controller\KeywordController:
298 arguments: [ '@security.authorization_checker', '@service_container', '@rapsys_user.access_decision_manager', '@doctrine', '@rapsys_pack.facebook_util', '@form.factory', '@rapsys_pack.image_util', '@mailer.mailer', '@doctrine.orm.default_entity_manager', '@rapsys_pack.path_package', '@router', '@rapsys_pack.slugger_util', '@security.helper', '@request_stack', '@translator', '@twig' ]
299 tags: [ 'controller.service_arguments' ]
300 Rapsys\BlogBundle\Factory\RepositoryFactory:
301 arguments: [ '@request_stack', '@router', '@rapsys_pack.slugger_util', '@translator', '%rapsys_blog.languages%', '%rapsys_blog.locale%' ]
302 #Register blog fixture
303 Rapsys\BlogBundle\Fixture\BlogFixture:
304 arguments: [ '@rapsys_pack.slugger_util' ]
305 tags: [ 'doctrine.fixture.orm' ]
306 #Register form factory as public
307 form.factory:
308 class: 'Symfony\Component\Form\FormFactory'
309 arguments: [ '@form.registry' ]
310 public: true
311 #Register facebook event subscriber
312 Rapsys\PackBundle\Subscriber\FacebookSubscriber:
313 arguments: [ '@router', '%rapsys_blog.locales%' ]
314 tags: [ 'kernel.event_subscriber' ]
315 #Register facebook util service
316 rapsys_blog.facebook_util:
317 class: 'Rapsys\PackBundle\Util\FacebookUtil'
318 #TODO: create the facebook.png file and add the fonts
319 #TODO: add a default font
320 arguments: [ '@router', '%kernel.project_dir%/var/cache', '%rapsys_pack.path%', 'facebook', '%rapsys_blog.path%/png/facebook.png', { irishgrover: '%rapsys_blog.path%/ttf/irishgrover.v10.ttf', labelleaurore: '%rapsys_blog.path%/ttf/labelleaurore.v10.ttf', dejavusans: '%rapsys_blog.path%/ttf/dejavusans.2.37.ttf', droidsans: '%rapsys_blog.path%/ttf/droidsans.regular.ttf' } ]
321 public: true
322 #Register contact form type
323 Rapsys\BlogBundle\Form\ContactType:
324 arguments: [ '@rapsys_pack.image_util', '@rapsys_pack.slugger_util', '@translator' ]
325 tags: [ 'form.type' ]
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: @RapsysBlog is a shortcut to vendor/rapsys/blogbundle/Resources/views directory here
337 form_theme: [ '@RapsysBlog/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 @RapsysBlog/png/logo.png in vendor/rapsys/blogbundle/Resources/public/png/logo.png
342 '%kernel.project_dir%/vendor/rapsys/blogbundle/Resources/public': 'RapsysBlog'