Provider::fillTags

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Provider
  4. fillTags
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/project/provider.php
  • Класс: BitrixTasksInternalsProjectProvider
  • Вызов: Provider::fillTags
public function fillTags(array $projects): array
{
	$tags = [];

	$res = WorkgroupTagTable::getList([
		'select' => ['GROUP_ID', 'NAME'],
		'filter' => [
			'GROUP_ID' => array_keys($projects),
			'GROUP.ACTIVE' => 'Y',
		],
	]);
	while ($tag = $res->fetch())
	{
		$tags[$tag['GROUP_ID']][] = $tag['NAME'];
	}

	foreach (array_keys($projects) as $projectId)
	{
		$projects[$projectId]['TAGS'] = $tags[$projectId];
	}

	return $projects;
}

Добавить комментарий