1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
entityerrorcollection.php
См. документацию.
1
<?
2
3
namespace
Bitrix\UI\EntitySelector;
4
5
use Traversable;
6
7
class
EntityErrorCollection
implements
\IteratorAggregate, \JsonSerializable
8
{
10
protected
array
$errors
= [];
11
12
public
function
add
(
EntityError
$error
): void
13
{
14
$this->errors[] =
$error
;
15
}
16
17
public
function
count
(): int
18
{
19
return
count
($this->errors);
20
}
21
22
public
function
getErrors
():
array
23
{
24
return
$this->errors
;
25
}
26
27
public
function
getEntityErrors
(
string
$entityId
):
array
28
{
29
$entityErrors = [];
30
foreach
($this->errors as
$error
)
31
{
32
if
(
$error
->getEntityId() ===
$entityId
)
33
{
34
$entityErrors[] =
$error
;
35
}
36
}
37
38
return
$entityErrors;
39
}
40
41
public
function
getErrorByCode
(
$code
): ?
EntityError
42
{
43
foreach
($this->errors as
$error
)
44
{
45
if
(
$error
->getCode() ===
$code
)
46
{
47
return
$error
;
48
}
49
}
50
51
return
null
;
52
}
53
54
public
function
jsonSerialize
():
array
55
{
56
return
$this->
getErrors
();
57
}
58
59
public
function
getIterator
(): Traversable
60
{
61
return
new \ArrayIterator($this->errors);
62
}
63
}
Bitrix\UI\EntitySelector\EntityErrorCollection
Определения
entityerrorcollection.php:8
Bitrix\UI\EntitySelector\EntityErrorCollection\$errors
array $errors
Определения
entityerrorcollection.php:10
Bitrix\UI\EntitySelector\EntityErrorCollection\getEntityErrors
getEntityErrors(string $entityId)
Определения
entityerrorcollection.php:27
Bitrix\UI\EntitySelector\EntityErrorCollection\getErrors
getErrors()
Определения
entityerrorcollection.php:22
Bitrix\UI\EntitySelector\EntityErrorCollection\add
add(EntityError $error)
Определения
entityerrorcollection.php:12
Bitrix\UI\EntitySelector\EntityErrorCollection\getIterator
getIterator()
Определения
entityerrorcollection.php:59
Bitrix\UI\EntitySelector\EntityErrorCollection\count
count()
Определения
entityerrorcollection.php:17
Bitrix\UI\EntitySelector\EntityErrorCollection\getErrorByCode
getErrorByCode($code)
Определения
entityerrorcollection.php:41
Bitrix\UI\EntitySelector\EntityErrorCollection\jsonSerialize
jsonSerialize()
Определения
entityerrorcollection.php:54
Bitrix\UI\EntitySelector\EntityError
Определения
entityerror.php:6
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
$entityId
$entityId
Определения
payment.php:4
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
ui
lib
entityselector
entityerrorcollection.php
Создано системой
1.14.0