1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
result.php
См. документацию.
1<?php
2
3namespace Bitrix\Bizproc;
4
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}
static fromCode(string $code, $customData=null)
Определения error.php:13
static createFromErrorCode(string $code, $customData=null)
Определения result.php:7
static createError(Error $error)
Определения result.php:12
getErrors()
Определения result.php:45
static createOk(?array $data=null)
Определения result.php:20
map(callable $callback)
Определения result.php:32
Определения error.php:15
isSuccess($internalCall=false)
Определения result.php:47
$data
Определения result.php:22
getData()
Определения result.php:148
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$error
Определения subscription_card_product.php:20