1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
errorcollection.php
См. документацию.
1<?php
2
3namespace Bitrix\Report\VisualConstructor\Internal\Error;
4
5use Bitrix\Main\Entity\Result;
6use Bitrix\Main;
7
13{
19 public function addOne(Error $error)
20 {
21 $this[] = $error;
22 }
23
29 public function addFromResult(Result $result)
30 {
31 $errors = array();
32 foreach ($result->getErrorMessages() as $message)
33 {
34 $errors[] = new Error($message);
35 }
36 unset($message);
37
38 $this->add($errors);
39 }
40
47 {
48 $this->add($entity->getErrors());
49 }
50
55 public function hasErrors()
56 {
57 return (bool)count($this);
58 }
59
65 public function getErrorsByCode($code)
66 {
67 $needle = array();
68 foreach($this->values as $error)
69 {
71 if($error->getCode() === $code)
72 {
73 $needle[] = $error;
74 }
75 }
76 unset($error);
77
78 return $needle;
79 }
80}
add(array $errors)
Определения errorcollection.php:32
Определения error.php:15
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$entity
$errors
Определения iblock_catalog_edit.php:74
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$message
Определения payment.php:8
$error
Определения subscription_card_product.php:20