code style guidelines

This commit is contained in:
Stig Lindqvist 2014-02-25 20:37:59 +13:00
parent 3b752be238
commit ec9b58aea8

View File

@ -60,6 +60,19 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
return self::$schedule;
}
/**
*
* @param \FieldList $actions
*/
public function updateCMSActions(\FieldList $actions) {
if($this->canBeReviewedBy(Member::currentUser())) {
$reviewAction = FormAction::create('reviewed', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed'))
->setAttribute('data-icon', 'pencil')
->setAttribute('data-text-alternate', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed'));
$actions->push($reviewAction);
}
}
/**
*
* @param SiteTree $page
@ -235,6 +248,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
$optionsFrom = ReadonlyField::create('ROType', _t('ContentReview.SETTINGSFROM', "Options are"), $this->owner->ContentReviewType);
$fields->addFieldsToTab("Root.ContentReview", array(
$contentOwners,
$nextReviewAt->performReadonlyTransformation(),
@ -327,19 +341,6 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
return (bool)$nextDate;
}
/**
*
* @param \FieldList $actions
*/
public function updateCMSActions(\FieldList $actions) {
if($this->canBeReviewedBy(Member::currentUser())) {
$reviewAction = FormAction::create('reviewed', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed'))
->setAttribute('data-icon', 'pencil')
->setAttribute('data-text-alternate', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed'));
$actions->push($reviewAction);
}
}
/**
* Check if a review is due by a member for this owner
*