• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/entitycounterfactory.php
  • Класс: Bitrix\Crm\Counter\EntityCounterFactory
  • Вызов: EntityCounterFactory::createTotalCounter
static function createTotalCounter(string $code, int $userId): AggregateCounter
{
	return new AggregateCounter(
		$code,
		array_map(
			fn (Factory $factory) => [
				'entityTypeID' => $factory->getEntityTypeId(),
				'counterTypeID' => EntityCounterType::ALL,
			],
			self::applyFilters(self::getEnabledFactories(), [
				[self::class, 'withoutCustomSectionsFilter'],
			])
		),
		$userId,
	);
}