mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Merge pull request #233 from creative-commoners/pulls/6/protect-hooks
API Set extension hook implementation visibility to protected
This commit is contained in:
commit
078c91560f
@ -110,7 +110,7 @@ class ContentReviewDefaultSettings extends DataExtension
|
|||||||
/**
|
/**
|
||||||
* @param FieldList $fields
|
* @param FieldList $fields
|
||||||
*/
|
*/
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$helpText = LiteralField::create(
|
$helpText = LiteralField::create(
|
||||||
'ContentReviewHelp',
|
'ContentReviewHelp',
|
||||||
|
@ -15,7 +15,7 @@ class ContentReviewLeftAndMainExtension extends LeftAndMainExtension
|
|||||||
*
|
*
|
||||||
* @param array &$clientConfig
|
* @param array &$clientConfig
|
||||||
*/
|
*/
|
||||||
public function updateClientConfig(&$clientConfig)
|
protected function updateClientConfig(&$clientConfig)
|
||||||
{
|
{
|
||||||
$clientConfig['form']['ReviewContentForm'] = [
|
$clientConfig['form']['ReviewContentForm'] = [
|
||||||
'schemaUrl' => $this->owner->Link('schema/ReviewContentForm')
|
'schemaUrl' => $this->owner->Link('schema/ReviewContentForm')
|
||||||
|
@ -23,7 +23,7 @@ class ContentReviewOwner extends DataExtension
|
|||||||
"SiteTreeContentReview" => SiteTree::class,
|
"SiteTreeContentReview" => SiteTree::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
// Remove automatically scaffolded GridField in Member CMS fields
|
// Remove automatically scaffolded GridField in Member CMS fields
|
||||||
$fields->removeByName('SiteTreeContentReview');
|
$fields->removeByName('SiteTreeContentReview');
|
||||||
|
@ -161,7 +161,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
/**
|
/**
|
||||||
* @param FieldList $actions
|
* @param FieldList $actions
|
||||||
*/
|
*/
|
||||||
public function updateCMSActions(FieldList $actions)
|
protected function updateCMSActions(FieldList $actions)
|
||||||
{
|
{
|
||||||
if (!$this->canBeReviewedBy(Security::getCurrentUser())) {
|
if (!$this->canBeReviewedBy(Security::getCurrentUser())) {
|
||||||
return;
|
return;
|
||||||
@ -326,7 +326,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
/**
|
/**
|
||||||
* @param FieldList $fields
|
* @param FieldList $fields
|
||||||
*/
|
*/
|
||||||
public function updateSettingsFields(FieldList $fields)
|
protected function updateSettingsFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
if ($this->owner->hasMethod('displayContentReview') && !$this->owner->displayContentReview()) {
|
if ($this->owner->hasMethod('displayContentReview') && !$this->owner->displayContentReview()) {
|
||||||
return;
|
return;
|
||||||
@ -564,7 +564,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
/**
|
/**
|
||||||
* Set the review data from the review period, if set.
|
* Set the review data from the review period, if set.
|
||||||
*/
|
*/
|
||||||
public function onBeforeWrite()
|
protected function onBeforeWrite()
|
||||||
{
|
{
|
||||||
// Only update if DB fields have been changed
|
// Only update if DB fields have been changed
|
||||||
$changedFields = $this->owner->getChangedFields(true, 2);
|
$changedFields = $this->owner->getChangedFields(true, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user