Skip to content

Commit

Permalink
CuBoulder/ucb_migration_shortcodes#15 Updates site contact info block…
Browse files Browse the repository at this point in the history
… render array
  • Loading branch information
timurtripp committed Feb 28, 2024
1 parent b04a25e commit 4927150
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Plugin/Block/SiteInfoBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,23 @@ public static function create(ContainerInterface $container, array $configuratio
*/
public function build() {
$config = $this->configFactory->get('ucb_site_configuration.contact_info');
$general = array_map(function ($item) {
return [
'visible' => $item['visible'],
'label' => $item['label'],
'value' => [
'#type' => 'processed_text',
'#text' => $item['value']['value'],
'#format' => $item['value']['format'],
'#langcode' => 'en',
],
];
}, $config->get('general'));
return [
'#data' => [
'icons_visible' => $config->get('icons_visible'),
'general_visible' => $config->get('general_visible'),
'general' => $config->get('general'),
'general' => $general,
'email_visible' => $config->get('email_visible'),
'email' => $config->get('email'),
'phone_visible' => $config->get('phone_visible'),
Expand Down

0 comments on commit 4927150

Please sign in to comment.