1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
errorcollection.php
См. документацию.
1<?php
2
3namespace Bitrix\Lists\Internals\Error;
4
5use Bitrix\Main\Entity\Result;
6use Bitrix\Main;
7
9{
15 public function addOne(Error $error)
16 {
17 $this[] = $error;
18 }
19
25 public function addFromResult(Result $result)
26 {
27 $errors = array();
28 foreach ($result->getErrorMessages() as $message)
29 {
30 $errors[] = new Error($message);
31 }
32 unset($message);
33
34 $this->add($errors);
35 }
36
41 public function hasErrors()
42 {
43 return (bool)count($this);
44 }
45
51 public function getErrorsByCode($code)
52 {
53 $needle = array();
54 foreach($this->values as $error)
55 {
57 if($error->getCode() == $code)
58 {
59 $needle[] = $error;
60 }
61 }
62 unset($error);
63
64 return $needle;
65 }
66}
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
$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