Your IP : 18.218.150.169


Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/components/bitrix/app.layout/
Upload File :
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/components/bitrix/app.layout/ajax.php

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true)
{
	die();
}

use Bitrix\Main;
use Bitrix\Rest;

class AppLayoutAjax extends Main\Engine\Controller
{
	public function getComponentAction($placementId, $placementOptions = [])
	{
		if ($placement = Rest\PlacementTable::getById($placementId)->fetchObject())
		{
			$component = new Main\Engine\Response\Component(
				'bitrix:app.layout',
				'',
				[
					'ID' => $placement->getAppId(),
					'PLACEMENT' => $placement->getPlacement(),
					'PLACEMENT_ID' => $placementId,
					'PLACEMENT_OPTIONS' => $placementOptions,
					'PARAM' => array(
						'FRAME_WIDTH' => '0',
						'FRAME_HEIGHT' => '0'
					),
				],
				[],
				[
					"APP_SID"
				]
			);
			return $component;
		}
		$this->errorCollection->add([new Main\Error("Placement was not found.")]);
		return [];
	}
}