1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
content.php
См. документацию.
1
<?php
8
namespace
Bitrix\Sender\Internals\QueryController;
9
10
use Bitrix\Main\Localization\Loc;
11
use Bitrix\Main\Error;
12
use Bitrix\Main\ErrorCollection;
13
14
Loc::loadMessages(__FILE__);
15
20
abstract
class
Content
21
{
22
const
TYPE_JSON
=
'json'
;
23
const
TYPE_HTML
=
'html'
;
24
26
protected
$errors
;
27
29
protected
$response
;
30
31
public
static
function
create
(
Response
$response
,
$type
)
32
{
33
switch
(
$type
)
34
{
35
case
Content::TYPE_HTML
:
36
return
new
ContentHtml
(
$response
);
37
38
case
Content::TYPE_JSON
:
39
default
:
40
return
new
ContentJson
(
$response
);
41
}
42
}
43
48
public
function
__construct
(
Response
$response
)
49
{
50
$this->errors =
new
ErrorCollection
;
51
$this->response =
$response
;
52
}
53
57
public
function
onFlush
()
58
{
59
60
}
61
65
abstract
public
function
toText
();
66
71
public
function
addError
(
$message
,
$code
=
null
)
72
{
73
$this->errors->setError(
new
Error
(
$message
,
$code
));
74
}
75
78
public
function
addPermissionError
(
$message
=
null
)
79
{
80
if
(!
$message
)
81
{
82
$message
=
'Access denied.'
;
83
}
84
85
$this->errors->setError(
new
Error
(
$message
, 0));
86
}
87
91
public
function
getErrorCollection
()
92
{
93
return
$this->errors
;
94
}
95
96
protected
function
getErrorMessages()
97
{
98
$list =
array
();
99
foreach
($this->errors as
$error
)
100
{
102
$list[] =
$error
->getMessage();
103
}
104
return
$list;
105
}
106
}
$type
$type
Определения
options.php:106
Bitrix\Main\ErrorCollection
Определения
errorcollection.php:14
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\Response
Определения
response.php:5
Bitrix\Sender\Internals\QueryController\Content
Определения
content.php:21
Bitrix\Sender\Internals\QueryController\Content\__construct
__construct(Response $response)
Определения
content.php:48
Bitrix\Sender\Internals\QueryController\Content\onFlush
onFlush()
Определения
content.php:57
Bitrix\Sender\Internals\QueryController\Content\addError
addError($message, $code=null)
Определения
content.php:71
Bitrix\Sender\Internals\QueryController\Content\toText
toText()
Bitrix\Sender\Internals\QueryController\Content\getErrorCollection
getErrorCollection()
Определения
content.php:91
Bitrix\Sender\Internals\QueryController\Content\addPermissionError
addPermissionError($message=null)
Определения
content.php:78
Bitrix\Sender\Internals\QueryController\Content\TYPE_JSON
const TYPE_JSON
Определения
content.php:22
Bitrix\Sender\Internals\QueryController\Content\TYPE_HTML
const TYPE_HTML
Определения
content.php:23
Bitrix\Sender\Internals\QueryController\Content\$errors
$errors
Определения
content.php:26
Bitrix\Sender\Internals\QueryController\Content\$response
$response
Определения
content.php:29
Bitrix\Sender\Internals\QueryController\Content\create
static create(Response $response, $type)
Определения
content.php:31
Bitrix\Sender\Internals\QueryController\ContentHtml
Определения
contenthtml.php:20
Bitrix\Sender\Internals\QueryController\ContentJson
Определения
contentjson.php:20
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
$message
$message
Определения
payment.php:8
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
sender
lib
internals
querycontroller
content.php
Создано системой
1.14.0