• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Kanban/Entity.php
  • Класс: BitrixCrmMobileKanbanEntity
  • Вызов: Entity::fillCountersData
protected function fillCountersData(array &$data, int $userId, array $extra): void
{
	$entityTypeId = $this->getEntityTypeId();

	$allSupportedTypes = EntityCounterType::getAllSupported($entityTypeId, true);
	foreach($allSupportedTypes as $typeId)
	{
		if(EntityCounterType::isGroupingForArray($typeId, $allSupportedTypes))
		{
			continue;
		}

		$counter = EntityCounterFactory::create($entityTypeId, $typeId, $userId, $extra);
		$code = $counter->getCode();
		$value = $counter->getValue(false);

		$data[] = [
			'typeId' => $typeId,
			'typeName' => EntityCounterType::resolveName($typeId),
			'code' => $code,
			'value' => $value,
			'excludeUsers' => ($extra['EXCLUDE_USERS'] ?? false),
		];
	}
}