Merge pull request #108 from creative-commoners/pulls/4/protect-hooks

API Set extension hook implementation visibility to protected
This commit is contained in:
Guy Sartorelli 2024-05-21 16:09:31 +12:00 committed by GitHub
commit 663e34ec89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ class VersionFeed extends SiteTreeExtension
'PublicHistory' => true 'PublicHistory' => true
); );
public function updateFieldLabels(&$labels) protected function updateFieldLabels(&$labels)
{ {
$labels['PublicHistory'] = _t(__CLASS__ . '.LABEL', 'Make history public'); $labels['PublicHistory'] = _t(__CLASS__ . '.LABEL', 'Make history public');
} }
@ -171,7 +171,7 @@ class VersionFeed extends SiteTreeExtension
return null; return null;
} }
public function updateSettingsFields(FieldList $fields) protected function updateSettingsFields(FieldList $fields)
{ {
if (!$this->owner->config()->get('changes_enabled')) { if (!$this->owner->config()->get('changes_enabled')) {
return; return;

View File

@ -60,7 +60,7 @@ class VersionFeedController extends Extension
} }
} }
public function onAfterInit() protected function onAfterInit()
{ {
$this->linkToPageRSSFeed(); $this->linkToPageRSSFeed();
$this->linkToAllSiteRSSFeed(); $this->linkToAllSiteRSSFeed();

View File

@ -24,12 +24,12 @@ class VersionFeedSiteConfig extends DataExtension
'AllChangesEnabled' => true 'AllChangesEnabled' => true
); );
public function updateFieldLabels(&$labels) protected function updateFieldLabels(&$labels)
{ {
$labels['AllChangesEnabled'] = _t(__CLASS__ . '.ALLCHANGESLABEL', 'Make global changes feed public'); $labels['AllChangesEnabled'] = _t(__CLASS__ . '.ALLCHANGESLABEL', 'Make global changes feed public');
} }
public function updateCMSFields(FieldList $fields) protected function updateCMSFields(FieldList $fields)
{ {
if (!Config::inst()->get(VersionFeed::class, 'allchanges_enabled')) { if (!Config::inst()->get(VersionFeed::class, 'allchanges_enabled')) {
return; return;