mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
Merge pull request #108 from creative-commoners/pulls/4/protect-hooks
API Set extension hook implementation visibility to protected
This commit is contained in:
commit
663e34ec89
@ -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;
|
||||||
|
@ -60,7 +60,7 @@ class VersionFeedController extends Extension
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onAfterInit()
|
protected function onAfterInit()
|
||||||
{
|
{
|
||||||
$this->linkToPageRSSFeed();
|
$this->linkToPageRSSFeed();
|
||||||
$this->linkToAllSiteRSSFeed();
|
$this->linkToAllSiteRSSFeed();
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user