1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
actiongettemplate.php
См. документацию.
1
<?php
8
namespace
Bitrix\Sender\Internals\CommonAjax
;
9
10
use
Bitrix\Main\Localization\Loc
;
11
use
Bitrix\Main\Loader
;
12
use
Bitrix\Main\HttpRequest
;
13
14
use
Bitrix\Sender\Templates
;
15
use
Bitrix\Sender\Internals\QueryController
as
Controller
;
16
use
Bitrix\Fileman\Block\Editor
;
17
18
Loc::loadMessages(__FILE__);
19
24
class
ActionGetTemplate
extends
CommonAction
25
{
26
const
NAME
=
'getTemplate'
;
27
33
public
static
function
get
()
34
{
35
return
parent::get()->setRequestMethodGet();
36
}
37
44
public
static
function
onRequest
(
HttpRequest
$request
,
Controller
\
Response
$response
)
45
{
46
$content
=
$response
->initContentHtml();
47
48
$type
=
$request
->get(
'template_type'
);
49
$id =
$request
->get(
'template_id'
);
50
$charset =
$request
->get(
'template_charset'
) ??
SITE_CHARSET
;
51
52
Loader::includeModule(
'fileman'
);
53
$template
=
Templates\Selector::create
()
54
->withTypeId(
$type
)
55
->withId($id)
56
->get();
57
if
(!
$template
)
58
{
59
return
;
60
}
61
62
$html =
Editor::getHtmlForEditor
(
$template
[
'FIELDS'
][
'MESSAGE'
][
'VALUE'
], $charset);
63
$content
->set($html);
64
}
65
}
$type
$type
Определения
options.php:106
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Fileman\Block\Editor
Определения
editor.php:20
Bitrix\Fileman\Block\Editor\getHtmlForEditor
static getHtmlForEditor($html, $charset=null)
Определения
editor.php:1103
Bitrix\Main\HttpRequest
Определения
httprequest.php:20
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Main\Localization\Loc
Определения
loc.php:12
Bitrix\Main\Response
Определения
response.php:5
Bitrix\Sender\Internals\CommonAjax\ActionGetTemplate
Определения
actiongettemplate.php:25
Bitrix\Sender\Internals\CommonAjax\ActionGetTemplate\NAME
const NAME
Определения
actiongettemplate.php:26
Bitrix\Sender\Internals\CommonAjax\ActionGetTemplate\onRequest
static onRequest(HttpRequest $request, Controller\Response $response)
Определения
actiongettemplate.php:44
Bitrix\Sender\Internals\CommonAjax\CommonAction
Определения
commonaction.php:22
Bitrix\Sender\Templates\Selector\create
static create()
Определения
selector.php:47
$content
$content
Определения
commerceml.php:144
$template
$template
Определения
file_edit.php:49
SITE_CHARSET
const SITE_CHARSET
Определения
include.php:62
Bitrix\Main\Controller
Определения
agreement.php:2
Bitrix\Sender\Internals\CommonAjax
Определения
actiongettemplate.php:8
Bitrix\Sender\Internals\QueryController
Определения
action.php:8
Bitrix\Sender\Templates
Определения
category.php:8
$response
$response
Определения
result.php:21
bitrix
modules
sender
lib
internals
commonajax
actiongettemplate.php
Создано системой
1.14.0