Add validation constraints to `type: theme_settings`
3 unresolved threads
Closes #3416178
Merge request reports
Activity
- Resolved by Wim Leers
241 # @todo use \Symfony\Component\Validator\Constraints\ImageValidator? 233 242 url: 234 type: string 243 # TRICKY: this is only part of config due to theme_get_setting() storing the URL computed from `path` in 244 # config; it's not actually configurable. Hence there's no need for actual validation: if `path` is set, then 245 # this will be (re)computed in theme_get_setting(). 246 type: uri 235 247 label: 'URL' 248 requiredKey: false 249 nullable: true 236 250 use_default: 237 251 type: boolean 238 252 label: 'Use the default shortcut icon supplied by the theme' 253 # If this is `true`, then `mimetype` and `path` are indeed optional keys. But if this is `false`, then they 254 # MUST be specified. 255 # @todo Figure out how to conditionally require other keys … without changing the config schema structure Isn't this something we already have the capability to do? See https://www.drupal.org/project/drupal/issues/3412361, and
editor.image_upload_settings.0
vs.editor.image_upload_settings.1
. (I might be misremembering the specifics, but my point stands.)Edited by Adam G-Hchanged this line in version 3 of the diff
added 1 commit
- a6a6abe4 - Make theme_settings.favicon and theme_settings.logo a dynamic type based on...
added 1 commit
- bc1f702b - Fix logic to only expand theme_settings.favicon and theme_settings.logo with...
- Resolved by Björn Brala
267 label: 'Shortcut icon settings' 268 mapping: 269 use_default: 270 type: boolean 271 label: 'Use the default shortcut icon supplied by the theme' 272 constraints: { } 273 274 theme_settings_favicon.0: 275 type: 'theme_settings_favicon.*' 276 label: 'Shortcut icon settings' 277 mapping: 278 mimetype: 279 type: string 280 label: 'MIME type' 281 requiredKey: false 282 nullable: true added 475 commits
-
85367b70...ee4eaba6 - 474 commits from branch
project:11.x
- ec27a368 - Merge remote-tracking branch 'origin/11.x' into 3416178-theme_settings_validatable
-
85367b70...ee4eaba6 - 474 commits from branch
added 14 commits
-
ec27a368...4add05d0 - 8 commits from branch
project:11.x
- deeefe9c - Describe the desired outcomes.
- 997b229c - Fix c/p error.
- 1372f18f - fix indentation
- 17ba8e51 - Make theme_settings.favicon and theme_settings.logo a dynamic type based on...
- ed73826f - Fix logic to only expand theme_settings.favicon and theme_settings.logo with...
- bce9911a - Fix remarks made by @phenaproxima
Toggle commit list-
ec27a368...4add05d0 - 8 commits from branch
305 type: boolean 306 label: 'Use the default shortcut icon supplied by the theme' 307 308 theme_settings_favicon.0: 309 type: 'theme_settings_favicon.*' 310 label: 'Shortcut icon settings' 311 mapping: 312 mimetype: 313 type: string 314 label: 'MIME type' 315 nullable: true 316 constraints: 317 Regex: 318 pattern: '/^image\/[a-z_\-\+]+$/' 319 message: "%value is not a valid image MIME type." 320 path: https://www.drupal.org/project/drupal/issues/3425852
Think there, file_uri and directory type should be incoming.
added 1 commit
- f7f92bb6 - The conditional settings for logo and favicon occur when they are ENABLED (->...
added 690 commits
-
b57e7346...5a9e57dc - 681 commits from branch
project:11.x
- a87d3583 - Describe the desired outcomes.
- d403d673 - Fix c/p error.
- 3527943d - fix indentation
- cbe9e9ab - Make theme_settings.favicon and theme_settings.logo a dynamic type based on...
- 0883a5d3 - Fix logic to only expand theme_settings.favicon and theme_settings.logo with...
- 7770e23e - Fix remarks made by @phenaproxima
- 57606266 - The conditional settings for logo and favicon occur when they are ENABLED (->...
-
4f2b009b - Whoops, no, that was actually totally accurate
- 51d2e972 - What this needed instead, is a fixed `system.theme.global`…
Toggle commit list-
b57e7346...5a9e57dc - 681 commits from branch
added 1227 commits
-
faaaeba5...0fbf14f1 - 1217 commits from branch
project:11.x
- 6c36c8d6 - Describe the desired outcomes.
- d3a48c15 - Fix c/p error.
- 5483bf95 - fix indentation
- fd3d74ab - Make theme_settings.favicon and theme_settings.logo a dynamic type based on...
- ae44c188 - Fix logic to only expand theme_settings.favicon and theme_settings.logo with...
- 8e533ccc - Fix remarks made by @phenaproxima
- 643731de - The conditional settings for logo and favicon occur when they are ENABLED (->...
-
a7d10fc4 - Whoops, no, that was actually totally accurate
- 45e1f457 - What this needed instead, is a fixed `system.theme.global`…
- 6c7936c9 - Fix incorrect profile config
Toggle commit list-
faaaeba5...0fbf14f1 - 1217 commits from branch
added 33 commits
-
6c7936c9...d1252474 - 23 commits from branch
project:11.x
- 1b712b7c - Describe the desired outcomes.
- c9b65f97 - Fix c/p error.
- de7a1718 - fix indentation
- 772282fb - Make theme_settings.favicon and theme_settings.logo a dynamic type based on...
- 0b2c1093 - Fix logic to only expand theme_settings.favicon and theme_settings.logo with...
- cdba993f - Fix remarks made by @phenaproxima
- eab1d60c - The conditional settings for logo and favicon occur when they are ENABLED (->...
-
b1a3e27c - Whoops, no, that was actually totally accurate
- 60373f70 - What this needed instead, is a fixed `system.theme.global`…
- a8ce6341 - Fix incorrect profile config
Toggle commit list-
6c7936c9...d1252474 - 23 commits from branch
Please register or sign in to reply