From 046c35851d01281bf853e3e3ead8098b17b7b46e Mon Sep 17 00:00:00 2001 From: mokaddem Date: Mon, 28 Jun 2021 15:04:02 +0200 Subject: [PATCH] chg: [appModel] Moved getAccessibleFieldForNew function into appModel --- src/Model/Entity/AppModel.php | 5 ++++- src/Model/Entity/Individual.php | 5 ----- src/Model/Entity/Organisation.php | 5 ----- src/Model/Entity/SharingGroup.php | 5 ----- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Model/Entity/AppModel.php b/src/Model/Entity/AppModel.php index d4704fe..84c86b3 100644 --- a/src/Model/Entity/AppModel.php +++ b/src/Model/Entity/AppModel.php @@ -6,5 +6,8 @@ use Cake\ORM\Entity; class AppModel extends Entity { - + public function getAccessibleFieldForNew(): array + { + return $this->_accessibleOnNew ?? []; + } } diff --git a/src/Model/Entity/Individual.php b/src/Model/Entity/Individual.php index dbcb03c..a14e339 100644 --- a/src/Model/Entity/Individual.php +++ b/src/Model/Entity/Individual.php @@ -16,9 +16,4 @@ class Individual extends AppModel protected $_accessibleOnNew = [ 'uuid' => true, ]; - - public function getAccessibleFieldForNew(): array - { - return $this->_accessibleOnNew; - } } diff --git a/src/Model/Entity/Organisation.php b/src/Model/Entity/Organisation.php index 3428c34..bc78378 100644 --- a/src/Model/Entity/Organisation.php +++ b/src/Model/Entity/Organisation.php @@ -16,9 +16,4 @@ class Organisation extends AppModel protected $_accessibleOnNew = [ 'uuid' => true, ]; - - public function getAccessibleFieldForNew(): array - { - return $this->_accessibleOnNew; - } } diff --git a/src/Model/Entity/SharingGroup.php b/src/Model/Entity/SharingGroup.php index e47ba4a..34d4b01 100644 --- a/src/Model/Entity/SharingGroup.php +++ b/src/Model/Entity/SharingGroup.php @@ -20,9 +20,4 @@ class SharingGroup extends AppModel 'organisation_id' => true, 'user_id' => true, ]; - - public function getAccessibleFieldForNew(): array - { - return $this->_accessibleOnNew; - } }