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; - } }