8namespace Bitrix\Sender\Internals;
10use Bitrix\Main\Access\Event\EventDictionary;
11use Bitrix\Main\Access\Exception\AccessException;
13use Bitrix\Main\ErrorCollection;
14use Bitrix\Main\Loader;
15use Bitrix\Main\LoaderException;
16use Bitrix\Main\Localization\Loc;
17use Bitrix\Sender\Access\AccessController;
18use Bitrix\Sender\Access\Exception\UnknownActionException;
19use Bitrix\Sender\Access\Exception\WrongPermissionException;
20use Bitrix\Sender\Security;
23Loc::loadMessages(__FILE__);
47 if (!Loader::includeModule(
'sender'))
49 $this->errors->setError(
new Error(Loc::getMessage(
'SENDER_MODULE_NOT_INSTALLED')));
69 $this->arParams[
'PATH_TO_LIST'] = $this->arParams[
'PATH_TO_LIST'] ??
'';
70 $this->arParams[
'PATH_TO_USER_PROFILE'] = $this->arParams[
'PATH_TO_USER_PROFILE'] ??
'';
71 $this->arParams[
'NAME_TEMPLATE'] = empty($this->arParams[
'NAME_TEMPLATE']) ?
72 \CSite::GetNameFormat(
false) :
73 str_replace(
array(
"#NOBR#",
"#/NOBR#"),
array(
"",
""), $this->arParams[
"NAME_TEMPLATE"]);
75 $this->arParams[
'RENDER_FILTER_INTO_VIEW'] = $this->arParams[
'RENDER_FILTER_INTO_VIEW'] ??
'';
76 $this->arParams[
'RENDER_FILTER_INTO_VIEW_SORT'] = $this->arParams[
'RENDER_FILTER_INTO_VIEW_SORT'] ?? 10;
78 if(isset($this->arParams[
'GRID_ID']))
80 $this->arParams[
'FILTER_ID'] = $this->arParams[
'FILTER_ID'] ?? $this->arParams[
'GRID_ID'] .
'_FILTER';
83 $this->arParams[
'SET_TITLE'] = !isset($this->arParams[
'SET_TITLE']) || $this->arParams[
'SET_TITLE'] ==
'Y';
90 if(is_null(static::getEditAction()))
97 $this->arParams[
'CAN_EDIT'] = $this->arParams[
'CAN_EDIT']
103 $this->errors->setError(
new Error(Loc::getMessage(
'SENDER_WRONG_PERMISSION')));
110 foreach ($this->errors as
$error)
125 if (!static::prepareResult())
136 if (!$this->accessController)
153 if((!isset($this->arParams[
'CAN_VIEW']) || !$this->arParams[
'CAN_VIEW']) && !$canAccess)
160 $this->errors->setError(
new Error(Loc::getMessage(
'SENDER_WRONG_PERMISSION')));
164 static::initParams();
180 if (!static::prepareResult())
186 if (!$this->errors->isEmpty())
prepareResultAndTemplate($template="")
checkComponentExecution()
static registerEvent($eventName, array $filter=[])
includeComponentTemplate($templatePage="", $customTemplatePath="")
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
ShowError($strError, $cls="errortext")