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
1 changed files with 1 additions and 1 deletions

View File

@ -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'] ?? [],
];
}