Skip to content

Commit df76e23

Browse files
authored
Merge pull request #29 from psu-libraries/28-add-schema-for-psulbrandingblock
Issue #28 - Renaming schema file and adding schema for the branding b…
2 parents 6fe1766 + 30c89ac commit df76e23

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

config/schema/psulib_base_helper.views.schema.yml renamed to config/schema/psulib_base_helper.schema.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
# Schema for the PSU Libraries Blocks.
2+
block.settings.psulib_base_helper_branding_block:
3+
type: block_settings
4+
label: 'Settings for PSUL Branding Block'
5+
mapping:
6+
use_site_logo:
7+
type: boolean
8+
label: 'Use site logo'
9+
use_site_name:
10+
type: boolean
11+
label: 'Use site name'
12+
use_site_slogan:
13+
type: boolean
14+
label: 'Use site slogan'
15+
hide_site_name:
16+
type: boolean
17+
label: 'Hide site name'
18+
logo_title:
19+
type: string
20+
label: 'Logo title attribute'
21+
logo_path:
22+
type: string
23+
label: 'Custom logo path'
24+
125
# Schema for the PSU Libraries views style plugins.
226
views.style.psul_accordion:
327
type: views_style

src/Plugin/Block/PsulBrandingBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function build(): array {
9090
'site_name' => $this->configuration['use_site_name'] ? $site_config->get('name') : '',
9191
'site_logo' => $this->configuration['use_site_logo'] ? theme_get_setting('logo.url') : '',
9292
'site_slogan' => $this->configuration['use_site_slogan'] ? $site_config->get('slogan') : '',
93-
'hide_site_name' => $this->configuration['hide_site_name'],
93+
'hide_site_name' => (bool) $this->configuration['hide_site_name'],
9494
'logo_title' => $this->configuration['logo_title'],
9595
'logo_path' => $this->configuration['logo_path'],
9696
],

0 commit comments

Comments
 (0)