1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
errorcollection.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Lists\Internals\Error;
4
5
use Bitrix\Main\Entity\Result;
6
use Bitrix\Main;
7
8
final
class
ErrorCollection
extends
Main\ErrorCollection
9
{
15
public
function
addOne
(
Error
$error
)
16
{
17
$this[] =
$error
;
18
}
19
25
public
function
addFromResult
(
Result
$result
)
26
{
27
$errors
=
array
();
28
foreach
(
$result
->getErrorMessages() as
$message
)
29
{
30
$errors
[] =
new
Error
(
$message
);
31
}
32
unset(
$message
);
33
34
$this->
add
(
$errors
);
35
}
36
41
public
function
hasErrors
()
42
{
43
return
(
bool
)
count
($this);
44
}
45
51
public
function
getErrorsByCode(
$code
)
52
{
53
$needle =
array
();
54
foreach
($this->values as
$error
)
55
{
57
if
(
$error
->getCode() ==
$code
)
58
{
59
$needle[] =
$error
;
60
}
61
}
62
unset(
$error
);
63
64
return
$needle;
65
}
66
}
Bitrix\Lists\Internals\Error\ErrorCollection\addFromResult
addFromResult(Result $result)
Определения
errorcollection.php:25
Bitrix\Lists\Internals\Error\ErrorCollection\hasErrors
hasErrors()
Определения
errorcollection.php:41
Bitrix\Lists\Internals\Error\ErrorCollection\addOne
addOne(Error $error)
Определения
errorcollection.php:15
Bitrix\Main\ErrorCollection
Определения
errorcollection.php:14
Bitrix\Main\ErrorCollection\add
add(array $errors)
Определения
errorcollection.php:32
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
Bitrix\Main\Type\Dictionary\count
count()
Определения
dictionary.php:187
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
$message
$message
Определения
payment.php:8
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
lists
lib
internals
error
errorcollection.php
Создано системой
1.14.0