• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Integration/Seo/Facebook/FacebookAgent.php
  • Класс: BitrixCatalogv2IntegrationSeoFacebookFacebookAgent
  • Вызов: FacebookAgent::registerCatalogFacebookAgent
static function registerCatalogFacebookAgent(): void
{
	$agent = CAgent::GetList(
		['ID' => 'DESC'],
		["MODULE_ID" => 'catalog', "NAME" => self::AGENT_NAME]
	);

	if (!$agent->Fetch())
	{
		CTimeZone::Disable();
		CAgent::AddAgent(
			self::AGENT_NAME,
			'catalog',
			'Y',
			300,
			'',
			'Y',
			ConvertTimeStamp(time() + 300, 'FULL'),
		);
		CTimeZone::Enable();
	}
}