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