From 53d697cbd12019b8b38c764095eb958b883f60e2 Mon Sep 17 00:00:00 2001 From: chentao Date: Wed, 31 May 2023 14:24:06 +0800 Subject: [PATCH] * ZIN: Add icon to the item of program menu widget. --- lib/zin/wg/programmenu/v1.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/zin/wg/programmenu/v1.php b/lib/zin/wg/programmenu/v1.php index e66774fc79..dbe49e219a 100644 --- a/lib/zin/wg/programmenu/v1.php +++ b/lib/zin/wg/programmenu/v1.php @@ -26,9 +26,12 @@ class programMenu extends wg foreach($children as $child) { $item = array('key' => $child->id, 'text' => $child->name, 'items' => array()); + if(isset($child->icon)) $item['icon'] = $child->icon; + $items = $this->buildMenuTree($item['items'], $child->id); if(count($items) !== 0) $item['items'] = $items; else unset($item['items']); + $parent[] = $item; } return $parent;