• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/counter/template/scrumcounter.php
  • Класс: BitrixTasksInternalsCounterTemplateScrumCounter
  • Вызов: ScrumCounter::getRowCounter
public function getRowCounter(int $groupId): array
{
	$result = [
		'COUNTERS' => [],
		'COLOR' => CounterStyle::STYLE_GRAY,
		'VALUE' => 0,
	];

	if (!$groupId)
	{
		return $result;
	}

	$counter = Counter::getInstance($this->userId);
	$counters = [
		'new_comments' => $counter->get(CounterDictionary::COUNTER_NEW_COMMENTS, $groupId),
		'project_new_comments' => $counter->get(CounterDictionary::COUNTER_GROUP_COMMENTS, $groupId),
	];

	$result['COUNTERS'] = $counters;
	$result['VALUE'] = array_sum($counters);

	if ($counters['new_comments'] > 0)
	{
		$result['COLOR'] = CounterStyle::STYLE_GREEN;
	}

	return $result;
}