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/landing/lib/assets/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/landing/lib/assets/preprocessing.php
<?php

namespace Bitrix\Landing\Assets;

use \Bitrix\Landing\Block;
use \Bitrix\Crm\CompanyTable;
use \Bitrix\Landing\Site;
use \Bitrix\Main\Loader;

class PreProcessing
{
	/**
	 * Processing the block on adding.
	 * @param Block $block Block instance.
	 * @return void
	 */
	public static function blockAddProcessing(Block $block): void
	{
		PreProcessing\Theme::processing($block);
		PreProcessing\Icon::processing($block);
		PreProcessing\Font::processing($block);
	}

	/**
	 * Processing the block on nodes updating.
	 * @param Block $block Block instance.
	 * @return void
	 */
	public static function blockUpdateNodeProcessing(Block $block): void
	{
		PreProcessing\Icon::processing($block);
		PreProcessing\Font::processing($block);
	}

	/**
	 * Processing the block on classes updating.
	 * @param Block $block Block instance.
	 * @return void
	 */
	public static function blockUpdateClassesProcessing(Block $block): void
	{
		PreProcessing\Font::processing($block);
	}

	/**
	 * Processing the block on undeleting.
	 * @param Block $block Block instance.
	 * @return void
	 */
	public static function blockUndeleteProcessing(Block $block): void
	{
		PreProcessing\Icon::processing($block);
		PreProcessing\Font::processing($block);
	}

	/**
	 * Processing the block on output.
	 * @param Block $block Block instance.
	 * @param bool $editMode Edit mode.
	 * @return void
	 */
	public static function blockViewProcessing(Block $block, bool $editMode = false): void
	{
		if (!$editMode)
		{
			PreProcessing\Icon::view($block);
			PreProcessing\CustomExtensions::view($block);
		}
		PreProcessing\Font::view($block);
	}

	/**
	 * Processing the block on publication.
	 * @param Block $block Block instance.
	 * @return void
	 */
	public static function blockPublicationProcessing(Block $block): void
	{
		if (self::isLazyloadEnable($block->getSiteId()))
		{
			PreProcessing\Lazyload::processing($block);
		}
		PreProcessing\CustomExtensions::processing($block);
	}

	/**
	 * Processing the dynamic setting to the block.
	 * @param Block $block Block instance.
	 * @return void
	 */
	public static function blockSetDynamicProcessing(Block $block): void
	{
		if (self::isLazyloadEnable($block->getSiteId()))
		{
			PreProcessing\Lazyload::processingDynamic($block);
		}
	}

	/**
	 * Check Speed Use Lazy hook.
	 * @param int $siteId Site id.
	 * @return bool
	 */
	protected static function isLazyloadEnable(int $siteId): bool
	{
		static $result;
		if ($result !== null)
		{
			return $result;
		}

		$hooks = Site::getHooks($siteId);
		$result =
			array_key_exists('SPEED', $hooks)
			&& $hooks['SPEED']->getPageFields()['SPEED_USE_LAZY']->getValue() !== 'N';

		return $result;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit