Issue Bug Closed

#104858SiteSettings->get() does return values for nested arrays in subproperties

Benjamin Franzke 09/09/24, 09:41 updated 10/15/24, 09:06

Description

A setting defined via Configuration/Sets/Set1/settings.definitions.yaml that contains at least one dot in the settings key

settings:
  foo.bar:
    type: stringlist
    default: ['a', 'b']
    label: FooBar

Can not be obtained by $settings->get('foo.bar'), because array-flattening does only allow access to 'foo.bar.0' and 'foo.bar.1', but not to the array 'foo.bar'.

This is because this value is serialized as

foo:
  bar:
    - a
    - b

The SiteSettings object should maintain an access for explicitly defined keys, and provide the values as well.

Reviews 5