API Added ability to extend permissions of SubmittedForm with an extension

This commit is contained in:
SilbinaryWolf 2016-04-22 11:33:02 +10:00 committed by Damian Mooyman
parent 32ae99112c
commit b537e6fe0b

View File

@ -83,6 +83,10 @@ class SubmittedForm extends DataObject {
* @return boolean
*/
public function canCreate($member = null) {
$extended = $this->extendedCan(__FUNCTION__, $member);
if($extended !== null) {
return $extended;
}
return $this->Parent()->canCreate();
}
@ -92,6 +96,10 @@ class SubmittedForm extends DataObject {
* @return boolean
*/
public function canView($member = null) {
$extended = $this->extendedCan(__FUNCTION__, $member);
if($extended !== null) {
return $extended;
}
return $this->Parent()->canView();
}
@ -101,6 +109,10 @@ class SubmittedForm extends DataObject {
* @return boolean
*/
public function canEdit($member = null) {
$extended = $this->extendedCan(__FUNCTION__, $member);
if($extended !== null) {
return $extended;
}
return $this->Parent()->canEdit();
}
@ -110,6 +122,10 @@ class SubmittedForm extends DataObject {
* @return boolean
*/
public function canDelete($member = null) {
$extended = $this->extendedCan(__FUNCTION__, $member);
if($extended !== null) {
return $extended;
}
return $this->Parent()->canDelete();
}