1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
result.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Bizproc;
4
5
class
Result
extends
\Bitrix\Main\Result
6
{
7
public
static
function
createFromErrorCode
(
string
$code
, $customData =
null
): self
8
{
9
return
static::createError(
Error::fromCode
(
$code
, $customData));
10
}
11
12
public
static
function
createError
(
Error
$error
): static
13
{
14
$res
=
new
static
();
15
$res
->addError(
$error
);
16
17
return
$res
;
18
}
19
20
public
static
function
createOk
(?
array
$data
=
null
): static
21
{
22
$res
=
new
static
();
23
24
if
(is_array(
$data
))
25
{
26
$res
->setData(
$data
);
27
}
28
29
return
$res
;
30
}
31
32
public
function
map
(callable $callback): self
33
{
34
if
($this->
isSuccess
())
35
{
36
return
$callback($this->
getData
());
37
}
38
39
return
$this;
40
}
41
45
public
function
getErrors
():
array
46
{
47
return
$this->errors->toArray();
48
}
49
}
Bitrix\Bizproc\Error\fromCode
static fromCode(string $code, $customData=null)
Определения
error.php:13
Bitrix\Bizproc\Result\createFromErrorCode
static createFromErrorCode(string $code, $customData=null)
Определения
result.php:7
Bitrix\Bizproc\Result\createError
static createError(Error $error)
Определения
result.php:12
Bitrix\Bizproc\Result\getErrors
getErrors()
Определения
result.php:45
Bitrix\Bizproc\Result\createOk
static createOk(?array $data=null)
Определения
result.php:20
Bitrix\Bizproc\Result\map
map(callable $callback)
Определения
result.php:32
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
Bitrix\Main\ORM\Data\Result\isSuccess
isSuccess($internalCall=false)
Определения
result.php:47
Bitrix\Main\Result\$data
$data
Определения
result.php:22
Bitrix\Main\Result\getData
getData()
Определения
result.php:148
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$res
$res
Определения
filter_act.php:7
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Bizproc\Result
Определения
DeviceResultHandler.php:3
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
bizproc
lib
result.php
Создано системой
1.14.0