• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/entitycounter.php
  • Класс: Bitrix\Crm\Counter\EntityCounter
  • Вызов: EntityCounter::calculateAggregatedValue
private function calculateAggregatedValue(): int
{
	$result = 0;
	$factory = Container::getInstance()->getFactory($this->entityTypeID);
	if (!$factory || !$factory->isCountersEnabled())
	{
		return $result;
	}
	$counterComponents = $factory->getCountersSettings()->getComponentsOfAllCounter();
	foreach ($counterComponents as $typeId)
	{
		$counter = new self($this->entityTypeID, $typeId, $this->userID, $this->extras);
		$result += $counter->getValue();
	}

	return $result;
}