From a34d7471473ee66cfe3c430c30225382c58dafd3 Mon Sep 17 00:00:00 2001 From: stes Date: Tue, 5 Dec 2017 16:01:05 +0200 Subject: [PATCH] bug fix --- models/CommentModel.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+), 0 deletions(-) diff --git a/models/CommentModel.php b/models/CommentModel.php index 1ae618f..b2ee559 100755 --- a/models/CommentModel.php +++ b/models/CommentModel.php @@ -406,5 +406,23 @@ return 'artbox\order\models\Customer'; } } + /** + * @return bool|\yii\db\ActiveQuery + */ + public function getEntityQuery() + { + if (method_exists($this->entity, 'find')) { + $query = call_user_func_array( + [ + $this->entity, + 'find', + ], + [] + ); + return $query->where([ 'id' => $this->entity_id ]); + } else { + return false; + } + } } \ No newline at end of file -- libgit2 0.21.4