Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
voteaccessresult.php
1<?php
2
4
6
7
8Loc::loadMessages(__FILE__);
10{
11 private $result = false;
12 private $errorType = 'ACCESS';
13 private $message = 'RATING_ALLOW_VOTE_ACCESS';
14
15 public function __construct()
16 {
17
18 }
19
23 public function toArray(): array
24 {
25 return [
26 'RESULT' => $this->result,
27 'ERROR_TYPE' => $this->errorType,
28 'ERROR_MSG' => Loc::getMessage($this->message),
29 ];
30 }
31
36 public function setResult(bool $result): self
37 {
38 $this->result = $result;
39 return $this;
40 }
41
46 public function setErrorType(string $type): self
47 {
48 $this->errorType = $type;
49 return $this;
50 }
51
56 public function setMessage(string $message): self
57 {
58 $this->message = $message;
59 return $this;
60 }
61}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29