• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/rest/controllers/task/counters.php
  • Класс: BitrixTasksRestControllersTaskCounters
  • Вызов: Counters::getAction
public function getAction($userId = 0, $groupId = 0, $type = 'view_all'): ?array
{
	if (!$this->checkGroupReadAccess($groupId))
	{
		$this->addError(new Error('Group not found or access denied.'));
		return null;
	}

	if (!$userId)
	{
		$userId = $this->getCurrentUser()->getId();
	}

	$counterInstance = Counter::getInstance($userId);

	return $counterInstance->getCounters($type, (int)$groupId);
}