Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
voteaccessresult.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Access
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
7
8
Loc::loadMessages
(__FILE__);
9
class
VoteAccessResult
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
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Socialnetwork\Access\VoteAccessResult
Definition
voteaccessresult.php:10
Bitrix\Socialnetwork\Access\VoteAccessResult\__construct
__construct()
Definition
voteaccessresult.php:15
Bitrix\Socialnetwork\Access\VoteAccessResult\setErrorType
setErrorType(string $type)
Definition
voteaccessresult.php:46
Bitrix\Socialnetwork\Access\VoteAccessResult\toArray
toArray()
Definition
voteaccessresult.php:23
Bitrix\Socialnetwork\Access\VoteAccessResult\setResult
setResult(bool $result)
Definition
voteaccessresult.php:36
Bitrix\Socialnetwork\Access\VoteAccessResult\setMessage
setMessage(string $message)
Definition
voteaccessresult.php:56
Bitrix\Socialnetwork\Access
Definition
voteaccesscontroller.php:3
modules
socialnetwork
lib
access
voteaccessresult.php
Создано системой
1.10.0