From 851d9cfee71c62d475fb2bb623debfd1eefc3014 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Wed, 10 Mar 2021 09:38:41 +0100 Subject: [PATCH] fix: [CRUD] Renamed confusing function --- src/Controller/Component/CRUDComponent.php | 2 +- src/Controller/OrganisationsController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/Component/CRUDComponent.php b/src/Controller/Component/CRUDComponent.php index 4cf42a0..f91a106 100644 --- a/src/Controller/Component/CRUDComponent.php +++ b/src/Controller/Component/CRUDComponent.php @@ -494,7 +494,7 @@ class CRUDComponent extends Component $this->Controller->set('filteringContexts', $filteringContexts); } - public function getParentsForMetaFields($query, array $metaConditions) + public function setParentConditionsForMetaFields($query, array $metaConditions) { $metaTemplates = $this->MetaFields->MetaTemplates->find('list', [ 'keyField' => 'name', diff --git a/src/Controller/OrganisationsController.php b/src/Controller/OrganisationsController.php index c3b8e0e..a8fc508 100644 --- a/src/Controller/OrganisationsController.php +++ b/src/Controller/OrganisationsController.php @@ -38,7 +38,7 @@ class OrganisationsController extends AppController [ 'label' => __('ENISA CSIRT Network (GOV)'), 'filterConditionFunction' => function($query) { - return $this->CRUD->getParentsForMetaFields($query, [ + return $this->CRUD->setParentConditionsForMetaFields($query, [ 'ENISA CSIRT Network' => [ [ 'field' => 'constituency',