3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Fix MapBlock::build() map #behaviors.

$this->configuration['map_behaviors'] will already be an
array of values, not an associative array of behavior machine
names and their labels. The necessary form value conversion
using array_keys() happens in MapBlock::blockSubmit().
This commit is contained in:
Michael Stenta 2024-01-20 11:20:44 -05:00
parent efc6797899
commit cce51328c0

View file

@ -123,7 +123,7 @@ class MapBlock extends BlockBase implements ContainerFactoryPluginInterface {
return [ return [
'#type' => 'farm_map', '#type' => 'farm_map',
'#map_type' => $this->configuration['map_type'] ?? 'default', '#map_type' => $this->configuration['map_type'] ?? 'default',
'#behaviors' => array_keys($this->configuration['map_behaviors']) ?? [], '#behaviors' => $this->configuration['map_behaviors'] ?? [],
]; ];
} }