1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
error.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing;
3
4
class
Error
5
{
10
protected
array
$errors
=
array
();
11
18
public
function
addError
(
$code
,
$message
=
''
)
19
{
20
$this->errors[] = new \Bitrix\Main\Error(
$message
!=
''
?
$message
:
$code
,
$code
);
21
}
22
28
public
function
copyError
(\
Bitrix
\
Landing
\
Error
$error
)
29
{
30
foreach
(
$error
->getErrors() as $err)
31
{
32
$this->errors[] = $err;
33
}
34
}
35
40
public
function
getFirstError
(): ?\
Bitrix
\
Main
\
Error
41
{
42
if
($this->errors)
43
{
44
$errors
= array_values($this->errors);
45
return
array_shift(
$errors
);
46
}
47
48
return
null
;
49
}
50
55
public
function
getErrors
()
56
{
57
return
$this->errors
;
58
}
59
64
public
function
isEmpty
()
65
{
66
return
empty($this->errors);
67
}
68
74
public
function
addFromResult
(
$result
)
75
{
76
if
(
77
(
78
$result
instanceof \
Bitrix
\
Main
\
Result
||
79
$result
instanceof \
Bitrix
\
Main
\
Entity
\
AddResult
||
80
$result
instanceof \
Bitrix
\
Main
\
Entity
\
UpdateResult
||
81
$result
instanceof \
Bitrix
\
Main
\
Entity
\
DeleteResult
82
) && !
$result
->isSuccess()
83
)
84
{
85
foreach
(
$result
->getErrors() as
$error
)
86
{
87
$this->
addError
(
88
$error
->getCode(),
89
$error
->getMessage()
90
);
91
}
92
}
93
}
94
}
Bitrix\Landing\Error\$errors
array $errors
Определения
error.php:10
Bitrix\Landing\Error\getFirstError
getFirstError()
Определения
error.php:40
Bitrix\Landing\Error\addFromResult
addFromResult($result)
Определения
error.php:74
Bitrix\Landing\Error\getErrors
getErrors()
Определения
error.php:55
Bitrix\Landing\Error\copyError
copyError(\Bitrix\Landing\Error $error)
Определения
error.php:28
Bitrix\Landing\Error\isEmpty
isEmpty()
Определения
error.php:64
Bitrix\Landing\Error\addError
addError($code, $message='')
Определения
error.php:18
Bitrix\Main\DB\Result
Определения
result.php:20
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\ORM\Data\AddResult
Определения
addresult.php:12
Bitrix\Main\ORM\Data\DeleteResult
Определения
deleteresult.php:12
Bitrix\Main\ORM\Data\UpdateResult
Определения
updateresult.php:14
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$errors
$errors
Определения
iblock_catalog_edit.php:74
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Landing
Определения
agent.php:3
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Main
Bitrix
$message
$message
Определения
payment.php:8
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
landing
lib
error.php
Создано системой
1.14.0