Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Commit 432311c

Browse files
author
Matthias Leutenegger
committed
CHANGE: update config
1 parent c13480d commit 432311c

File tree

5 files changed

+12
-57
lines changed

5 files changed

+12
-57
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ composer require syntro/silverstripe-elemental-bootstrap-alertsection
3131
See [License](license.md)
3232

3333
## Documentation
34-
* [Color](docs/en/colors.md)
34+
All configuration options follow [the base items config](https://github.com/syntro-opensource/silverstripe-elemental-bootstrap-baseitems#documentation). The following options are custom to this section:
3535
* [Icons](docs/en/icons.md)
36-
* [Customize](docs/en/customizing.md)
3736

3837
<!-- ## Example configuration (optional)
3938
If your module makes use of the config API in SilverStripe it's a good idea to provide an example config

docs/en/colors.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/en/customizing.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/en/icons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ but you can disable it via yaml if necessary:
55

66
```yaml
77
Syntro\SilverStripeElementalBootstrapAlertSection\Elements\ElementAlertSection:
8-
faIcons: false
8+
use_fa_icons: false
99
```

src/Elements/AlertSection.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ class AlertSection extends BootstrapSectionBaseElement
4343
*/
4444
private static $table_name = 'ElementAlertSection';
4545

46+
47+
/**
48+
* if set to false, no Icons will be displayed
49+
*
50+
* @config
51+
* @var bool
52+
*/
53+
private static $use_fa_icons = true;
54+
4655
/**
4756
* set to false if image option should not show up
4857
*
@@ -84,11 +93,6 @@ class AlertSection extends BootstrapSectionBaseElement
8493

8594
private static $link_colors_by_text = [];
8695

87-
/**
88-
* @config
89-
* @var bool
90-
*/
91-
private static $faIcons = true;
9296

9397
private static $db = [
9498
'Content' => 'Text',
@@ -194,7 +198,7 @@ public function getCMSFields()
194198
*/
195199
public function useIcons()
196200
{
197-
return $this->config()->get('faIcons');
201+
return $this->config()->get('use_fa_icons');
198202
}
199203

200204

0 commit comments

Comments
 (0)