From d8807cce921a41c7ee990e6c4a02f393c6385d8d Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Wed, 9 Feb 2022 15:18:24 +0100 Subject: [PATCH] chg: [behavior:meta-fields] Renamed finder function --- src/Model/Behavior/MetaFieldsBehavior.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/Behavior/MetaFieldsBehavior.php b/src/Model/Behavior/MetaFieldsBehavior.php index f558981..9d520a6 100644 --- a/src/Model/Behavior/MetaFieldsBehavior.php +++ b/src/Model/Behavior/MetaFieldsBehavior.php @@ -39,7 +39,7 @@ class MetaFieldsBehavior extends Behavior 'buildMetaFieldQuerySnippetForMatchingParent' => 'buildQuerySnippetForMatchingParent', ], 'implementedFinders' => [ - 'metafieldValue' => 'findMetafieldValue', + 'metafield' => 'findMetafield', ], ]; @@ -119,12 +119,12 @@ class MetaFieldsBehavior extends Behavior /** * Usage: - * $this->{$model}->find('metaFieldValue', [ + * $this->{$model}->find('metaField', [ * ['meta_template_id' => 1, 'field' => 'email', 'value' => '%@domain.test'], * ['meta_template_id' => 1, 'field' => 'country_code', 'value' => '!LU'], * ['meta_template_id' => 1, 'field' => 'time_zone', 'value' => 'UTC+2'], * ]) - * $this->{$model}->find('metaFieldValue', [ + * $this->{$model}->find('metaField', [ * 'AND' => [ * ['meta_template_id' => 1, 'field' => 'email', 'value' => '%@domain.test'], * 'OR' => [ @@ -134,7 +134,7 @@ class MetaFieldsBehavior extends Behavior * ], * ]) */ - public function findMetafieldValue(Query $query, array $filters) + public function findMetafield(Query $query, array $filters) { $conditions = $this->buildQuerySnippetForMatchingParent($filters); $query->where($conditions);