This commit is contained in:
2021-03-30 16:33:12 +08:00
parent 9f84636b6c
commit 06e0b66eb1
+6
View File
@@ -160,7 +160,13 @@ abstract class GiiBase
protected function getClassProperty(ReflectionClass $class): string protected function getClassProperty(ReflectionClass $class): string
{ {
$html = ''; $html = '';
$rc = $class->getParentClass()->getConstants();
foreach ($class->getConstants() as $key => $val) { foreach ($class->getConstants() as $key => $val) {
if (isset($rc[$key])) {
continue;
}
if (is_numeric($val)) { if (is_numeric($val)) {
$html .= ' $html .= '
const ' . $key . ' = ' . $val . ';' . "\n"; const ' . $key . ' = ' . $val . ';' . "\n";