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/components/bitrix/ui.feedback.form/ |
Upload File : |
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die(); } use Bitrix\Main\Loader; /** * Class UiFeedbackForm */ class UiFeedbackForm extends CBitrixComponent { public function executeComponent() { if (!Loader::includeModule('ui')) { return; } if (empty($this->arParams['ID'])) { return; } $this->arParams['ID'] = strval($this->arParams['ID']); if (empty($this->arParams['FORMS']) || !is_array($this->arParams['FORMS'])) { return; } $feedbackForm = new \Bitrix\UI\Form\FeedbackForm($this->arParams['ID']); $feedbackForm->setFormParams($this->arParams['FORMS']); $feedbackForm->setPresets( isset($this->arParams['PRESETS']) && is_array($this->arParams['PRESETS']) ? $this->arParams['PRESETS'] : [] ); if (isset($this->arParams['TITLE'])) { $feedbackForm->setTitle($this->arParams['TITLE']); } if (isset($this->arParams['PORTAL_URI'])) { $feedbackForm->setPortalUri($this->arParams['PORTAL_URI']); } $this->arResult['FORM'] = $feedbackForm->getFormParams(); if (!$this->arResult['FORM']) { return; } $this->arResult['PRESETS'] = $feedbackForm->getPresets(); $this->arResult['TITLE'] = $feedbackForm->getTitle(); $this->arResult['PORTAL_URI'] = $feedbackForm->getPortalUri(); $this->arResult['JS_OBJECT_PARAMS'] = $feedbackForm->getJsObjectParams(); $this->arParams['VIEW_TARGET'] = array_key_exists('VIEW_TARGET', $this->arParams) ? $this->arParams['VIEW_TARGET'] : 'pagetitle'; $this->includeComponentTemplate(); } }