10 public static function fillTags(array $params = []): array
15 !isset($params[
'groupIdList'])
16 || !is_array($params[
'groupIdList'])
22 $groupIdList = Util::filterNumericIdList($params[
'groupIdList']);
23 if (empty($groupIdList))
28 $query =
new Query(WorkgroupTagTable::getEntity());
34 ->whereIn(
'GROUP_ID', $groupIdList)
35 ->exec()->fetchCollection();
37 foreach ($records as $record)
39 $tag = (string)$record->get(
'NAME');
40 $groupId = (int)$record->get(
'GROUP_ID');
42 if (!isset($result[$groupId]))
44 $result[$groupId] = [];
47 $result[$groupId][] = $tag;