• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/agent.php
  • Класс: BitrixLandingAgent
  • Вызов: Agent::sendRestStatistic
static function sendRestStatistic(): string
{
	if (
		BitrixMainLoader::includeModule('rest')
		&& is_callable(['BitrixRestUsageStatTable', 'logLanding'])
	)
	{
		$statCode = [
			BitrixLandingPublicAction::REST_USAGE_TYPE_BLOCK => 'LANDING_BLOCK',
			BitrixLandingPublicAction::REST_USAGE_TYPE_PAGE => 'LANDING_PAGE',
		];
		$data = PublicAction::getRestStat(false, true);
		foreach ($data as $type => $stat)
		{
			if ($statCode[$type])
			{
				foreach ($stat as $clientId => $count)
				{
					BitrixRestUsageStatTable::logLanding($clientId, $statCode[$type], $count);
				}
			}
		}
		BitrixRestUsageStatTable::finalize();
	}

	return __CLASS__ . '::' . __FUNCTION__ . '();';
}