From 7829a76e40e6643c031e7c37cd28bed21db68fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 19 Jan 2021 20:10:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gii/GiiModel.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Gii/GiiModel.php b/Gii/GiiModel.php index a1d63063..053e8fe9 100644 --- a/Gii/GiiModel.php +++ b/Gii/GiiModel.php @@ -129,8 +129,14 @@ class ' . $managerName . ' extends ActiveRecord if ($key == 'primary') { continue; } - $html .= ' + + if ($property->hasType()) { + $html .= ' + ' . $debug . ' ' . $property->getType() . ' $' . $key . ' = ' . $val . ';' . "\n"; + } else { + $html .= ' ' . $debug . ' $' . $key . ' = ' . $val . ';' . "\n"; + } } }