Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
gridresponsefactory.php
1
<?php
2
3
namespace
Bitrix\Main\Grid\UI\Response
;
4
5
use
Bitrix\Main\Grid\MessageType
;
6
use
Bitrix\Main\Grid\UI\GridResponse
;
7
use
Bitrix\Main\Result
;
8
9
class
GridResponseFactory
10
{
18
public
function
createFromResult
(
Result
$result):
GridResponse
19
{
20
$self =
new
GridResponse
();
21
22
foreach
($result->
getErrorMessages
() as $message)
23
{
24
$self->addMessage($message,
MessageType::ERROR
);
25
}
26
27
return
$self;
28
}
29
}
Bitrix\Main\Grid\MessageType
Definition
messagetype.php:11
Bitrix\Main\Grid\MessageType\ERROR
const ERROR
Definition
messagetype.php:13
Bitrix\Main\Grid\UI\GridResponse
Definition
gridresponse.php:13
Bitrix\Main\Grid\UI\Response\GridResponseFactory
Definition
gridresponsefactory.php:10
Bitrix\Main\Grid\UI\Response\GridResponseFactory\createFromResult
createFromResult(Result $result)
Definition
gridresponsefactory.php:18
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\Result
Definition
result.php:14
Bitrix\Main\Result\getErrorMessages
getErrorMessages()
Definition
result.php:82
Bitrix\Main\Grid\UI\Response
Definition
gridresponsefactory.php:3
modules
main
lib
grid
ui
response
gridresponsefactory.php
Создано системой
1.10.0