Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
startscriptresult.php
1<?php
2
4
8
10{
11 public const CODE_NOT_ENOUGH_RIGHTS = 'NOT_ENOUGH_RIGHTS';
12 public const CODE_SCRIPT_NOT_EXIST = 'SCRIPT_NOT_EXIST';
13 public const CODE_INACTIVE_SCRIPT = 'INACTIVE_SCRIPT';
14 public const CODE_TEMPLATE_NOT_EXIST = 'TEMPLATE_NOT_EXIST';
15 public const CODE_EMPTY_TEMPLATE_PARAMETERS = 'EMPTY_TEMPLATE_PARAMETERS';
16 public const CODE_INVALID_PARAMETERS = 'INVALID_PARAMETERS';
17
19 {
20 $this->addError(new Error(
21 Loc::getMessage('BIZPROC_LIB_SCRIPT_START_SCRIPT_RESULT_NOT_ENOUGH_RIGHTS'),
22 self::CODE_NOT_ENOUGH_RIGHTS)
23 );
24
25 return $this;
26 }
27
29 {
30 $this->addError(new Error(
31 Loc::getMessage('BIZPROC_LIB_SCRIPT_START_SCRIPT_RESULT_SCRIPT_NOT_EXIST'),
32 self::CODE_SCRIPT_NOT_EXIST)
33 );
34
35 return $this;
36 }
37
39 {
40 $this->addError(new Error(
41 Loc::getMessage('BIZPROC_LIB_SCRIPT_START_SCRIPT_RESULT_INACTIVE_SCRIPT'),
42 self::CODE_INACTIVE_SCRIPT)
43 );
44
45 return $this;
46 }
47
49 {
50 $this->addError(new Error(
51 Loc::getMessage('BIZPROC_LIB_SCRIPT_START_SCRIPT_RESULT_TEMPLATE_NOT_EXIST'),
52 self::CODE_TEMPLATE_NOT_EXIST)
53 );
54
55 return $this;
56 }
57
59 {
60 $this->addError(new Error(
61 Loc::getMessage('BIZPROC_LIB_SCRIPT_START_SCRIPT_RESULT_EMPTY_TEMPLATE_PARAMETERS'),
62 self::CODE_EMPTY_TEMPLATE_PARAMETERS)
63 );
64
65 return $this;
66 }
67
69 {
70 foreach ($errors as $error)
71 {
72 $this->addError(new Error($error['message'], self::CODE_INVALID_PARAMETERS));
73 }
74
75 return $this;
76 }
77}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
addError(Error $error)
Definition result.php:50