Skip to content

Commit

Permalink
UPDATE initial cache key module configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
muskie9 committed Feb 19, 2024
1 parent 9523bc0 commit 43cc78d
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 9 deletions.
3 changes: 3 additions & 0 deletions _config/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
Name: silverstripebasesiteconfig
---
SilverStripe\CMS\Model\SiteTree:
extensions:
- Dynamic\Base\Cache\SiteTreeDataExtension
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"jonom/silverstripe-text-target-length": "^2",
"silverstripe/recipe-cms": "^5",
"silverstripe/sharedraftcontent": "^3",
"silverstripe-terraformers/keys-for-cache": "^2.0",
"tractorcow/silverstripe-robots": "^4",
"wilr/silverstripe-googlesitemaps": "^3"
},
Expand Down
25 changes: 25 additions & 0 deletions src/Cache/SiteTreeDataExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Dynamic\Base\Cache;

use Dynamic\Base\Model\NavigationGroup;
use SilverStripe\ORM\DataExtension;
use SilverStripe\SiteConfig\SiteConfig;

/**
* Class \Dynamic\Base\Cache\SiteTreeDataExtension
*
* @property SiteTree|SiteTreeDataExtension $owner
* @method ManyManyList|SiteConfig[] SiteConfigs()
* @method ManyManyList|NavigationGroup[] NavigationGroups()
*/
class SiteTreeDataExtension extends DataExtension
{
/**
* @var array|string[]
*/
private static array $belongs_many_many = [
'SiteConfigs' => SiteConfig::class,
'NavigationGroups' => NavigationGroup::class,
];
}
10 changes: 7 additions & 3 deletions src/Page/BlockPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
/**
* Class \Dynamic\Base\Page\BlockPage
*
* @property string $Controls
* @property string $Indicators
* @property string $Transitions
* @property string $Autoplay
* @property int $Interval
* @property int $ElementalAreaID
* @property int $HeaderImageID
* @method ElementalArea ElementalArea()
* @method HeaderImage HeaderImage()
* @mixin HeaderImageExtension
* @method ManyManyList|Slide[] Slides()
* @mixin ElementalPageExtension
* @mixin CarouselPageExtension
*/
class BlockPage extends \Page
{
Expand Down
10 changes: 7 additions & 3 deletions src/Page/CampaignLandingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
/**
* Class \Dynamic\Base\Page\CampaignLandingPage
*
* @property string $Controls
* @property string $Indicators
* @property string $Transitions
* @property string $Autoplay
* @property int $Interval
* @property int $ElementalAreaID
* @property int $HeaderImageID
* @method ElementalArea ElementalArea()
* @method HeaderImage HeaderImage()
* @mixin HeaderImageExtension
* @method ManyManyList|Slide[] Slides()
* @mixin ElementalPageExtension
* @mixin CarouselPageExtension
*/
class CampaignLandingPage extends \Page
{
Expand Down
10 changes: 7 additions & 3 deletions src/Page/HomePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
/**
* Class \Dynamic\Base\Page\HomePage
*
* @property string $Controls
* @property string $Indicators
* @property string $Transitions
* @property string $Autoplay
* @property int $Interval
* @property int $ElementalAreaID
* @property int $HeaderImageID
* @property int $ElementalHomePageID
* @method ElementalArea ElementalArea()
* @method HeaderImage HeaderImage()
* @method ElementalArea ElementalHomePage()
* @mixin HeaderImageExtension
* @method ManyManyList|Slide[] Slides()
* @mixin ElementalPageExtension
* @mixin CarouselPageExtension
*/
class HomePage extends \Page
{
Expand Down

0 comments on commit 43cc78d

Please sign in to comment.