From 20bec3cc2fdc1bb89bc670aaa8911b3e4906f2c7 Mon Sep 17 00:00:00 2001 From: sunhao Date: Mon, 11 Mar 2024 11:45:39 +0800 Subject: [PATCH] * zin: refactor entityLabel with idLabel. --- lib/zin/wg/entitylabel/v1.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/zin/wg/entitylabel/v1.php b/lib/zin/wg/entitylabel/v1.php index ce599d7622..e135faab8a 100644 --- a/lib/zin/wg/entitylabel/v1.php +++ b/lib/zin/wg/entitylabel/v1.php @@ -2,7 +2,7 @@ declare(strict_types=1); namespace zin; -require_once dirname(__DIR__) . DS . 'label' . DS . 'v1.php'; +require_once dirname(__DIR__) . DS . 'idlabel' . DS . 'v1.php'; class entityLabel extends wg { @@ -48,11 +48,7 @@ class entityLabel extends wg $className = $this->prop('idClass'); if(!isset($entityID)) return null; - return new label - ( - setClass('justify-center rounded-full px-1.5 h-3.5', $className), - $entityID - ); + return idLabel::create($entityID, array('class' => $className)); } private function buildEntityName(): node