File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ * [ PR-7] ( https://github.com/itk-dev/drupal_admin_message/pull/7 )
11
+ Added ` show_on_all_pages ` option
10
12
* [ PR-6] ( https://github.com/itk-dev/drupal_admin_message/pull/6 )
11
13
Added version matrix
12
14
Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ $settings['drupal_admin_message']['css']['background-color'] = 'orange';
33
33
$settings['drupal_admin_message']['css']['color'] = 'white;';
34
34
```
35
35
36
+ The message can optionally be shown on _ all_ pages:
37
+
38
+ ``` php
39
+ # settings.local.php
40
+ $settings['drupal_admin_message']['show_on_all_pages'] = TRUE;
41
+ ```
42
+
36
43
## Coding standards
37
44
38
45
``` shell
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ public function onResponse(ResponseEvent $event): void {
44
44
* Get message.
45
45
*/
46
46
private function getMessage (): ?string {
47
- if ($ this ->adminContext ->isAdminRoute ()) {
48
- $ settings = Settings::get ('drupal_admin_message ' );
47
+ $ settings = Settings::get ('drupal_admin_message ' );
48
+
49
+ if ($ this ->adminContext ->isAdminRoute () || ($ settings ['show_on_all_pages ' ] ?? FALSE )) {
49
50
$ blocks = array_filter ((array ) ($ settings ['blocks ' ] ?? NULL ));
50
51
51
52
if (!empty ($ blocks )) {
You can’t perform that action at this time.
0 commit comments