1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
objectstatus.php
См. документацию.
1
<?php
2
namespace
Bitrix\Calendar\Sync\Office365\Util
;
3
8
class
ObjectStatus
9
{
11
private
array
$errors = [];
12
16
public
function
isSuccess
(): bool
17
{
18
return
empty($this->errors);
19
}
20
24
public
function
hasErrors
(): bool
25
{
26
return
!$this->
isSuccess
();
27
}
28
34
public
function
addError
(
string
$code
,
string
$message
)
35
{
36
$this->errors[] = [
37
'code'
=>
$code
,
38
'message'
=>
$message
,
39
];
40
}
41
45
public
function
resetErrors
()
46
{
47
$this->errors = [];
48
}
49
53
public
function
getErrors
():
array
54
{
55
return
$this->errors
;
56
}
57
62
public
function
getErrorsByCode
(
string
$code
):
array
63
{
64
if
(!$this->
hasErrors
())
65
{
66
return
[];
67
}
68
69
return
array_filter($this->errors,
static
function
(
$error
) use (
$code
)
70
{
71
return
$error
[
'code'
] ==
$code
;
72
});
73
}
74
79
public
function
getErrorByCode
(
string
$code
):
array
80
{
81
if
($filteredErrors = $this->
getErrorsByCode
($code))
82
{
83
return
end($filteredErrors);
84
}
85
86
return
[];
87
}
88
}
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus
Определения
objectstatus.php:9
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\isSuccess
isSuccess()
Определения
objectstatus.php:16
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\getErrors
getErrors()
Определения
objectstatus.php:53
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\getErrorByCode
getErrorByCode(string $code)
Определения
objectstatus.php:79
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\resetErrors
resetErrors()
Определения
objectstatus.php:45
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\addError
addError(string $code, string $message)
Определения
objectstatus.php:34
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\hasErrors
hasErrors()
Определения
objectstatus.php:24
Bitrix\Calendar\Sync\Office365\Util\ObjectStatus\getErrorsByCode
getErrorsByCode(string $code)
Определения
objectstatus.php:62
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$errors
$errors
Определения
iblock_catalog_edit.php:74
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Calendar\Sync\Office365\Util
Определения
objectstatus.php:2
$message
$message
Определения
payment.php:8
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
calendar
lib
sync
office365
util
objectstatus.php
Создано системой
1.14.0