From ba188d04ff4aa8e1219290411b63486a44826baa Mon Sep 17 00:00:00 2001 From: GeorgeFreeman Date: Sun, 20 Jan 2019 00:36:32 +0500 Subject: [PATCH] Fix gii model generator (#261) --- src/gii/model/Generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gii/model/Generator.php b/src/gii/model/Generator.php index 32800ee8a..e7ae44449 100644 --- a/src/gii/model/Generator.php +++ b/src/gii/model/Generator.php @@ -155,7 +155,7 @@ public function generate() $attributes = array_merge(['_id'], $customAttributes); } - $className = $this->generateClassName($collectionName); + $className = $this->modelClass ?: $this->generateClassName($collectionName); $params = [ 'collectionName' => $collectionName, 'className' => $className,