From cce51328c015277f60e0ff48d21ce7ca1f076668 Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Sat, 20 Jan 2024 11:20:44 -0500 Subject: [PATCH] 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(). --- modules/core/map/src/Plugin/Block/MapBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/map/src/Plugin/Block/MapBlock.php b/modules/core/map/src/Plugin/Block/MapBlock.php index 4b4ff4ac1..3d31d7e0d 100644 --- a/modules/core/map/src/Plugin/Block/MapBlock.php +++ b/modules/core/map/src/Plugin/Block/MapBlock.php @@ -123,7 +123,7 @@ class MapBlock extends BlockBase implements ContainerFactoryPluginInterface { return [ '#type' => 'farm_map', '#map_type' => $this->configuration['map_type'] ?? 'default', - '#behaviors' => array_keys($this->configuration['map_behaviors']) ?? [], + '#behaviors' => $this->configuration['map_behaviors'] ?? [], ]; }