1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
defaultconnector.php
См. документацию.
1
<?
2
namespace
Bitrix\Vote\Attachment;
3
4
use Bitrix\Main\Loader;
5
use Bitrix\Main\Localization\Loc;
6
use Bitrix\Vote\Channel;
7
8
Loc::loadMessages(__FILE__);
9
10
class
DefaultConnector
extends
Connector
implements
Storable
11
{
12
private
$storage =
null
;
13
private
$canRead =
array
();
14
private
$canEdit =
array
();
15
20
public
function
canRead
(
$userId
)
21
{
22
if
(!array_key_exists(
$userId
, $this->
canRead
) && $this->
isStorable
())
23
$this->
canRead
[
$userId
] = $this->
getStorage
()->canRead(
$userId
);
24
return
(isset($this->
canRead
[
$userId
]) ? $this->
canRead
[
$userId
] :
false
);
25
}
26
31
public
function
canEdit
(
$userId
)
32
{
33
if
(!array_key_exists(
$userId
, $this->
canEdit
) && $this->
isStorable
())
34
$this->
canEdit
[
$userId
] = $this->
getStorage
()->canEditVote(
$userId
);
35
return
(isset($this->
canEdit
[
$userId
]) ? $this->
canEdit
[
$userId
] :
false
);
36
}
37
42
public
function
setStorage
(
Channel
$channel)
43
{
44
$this->storage = $channel;
45
46
return
$this;
47
}
48
52
public
function
getStorage
()
53
{
54
return
$this->storage
;
55
}
56
60
public
function
isStorable
()
61
{
62
return
($this->storage !==
null
);
63
}
64
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Vote\Attachment\Connector
Определения
connector.php:12
Bitrix\Vote\Attachment\DefaultConnector
Определения
defaultconnector.php:11
Bitrix\Vote\Attachment\DefaultConnector\canEdit
canEdit($userId)
Определения
defaultconnector.php:31
Bitrix\Vote\Attachment\DefaultConnector\getStorage
getStorage()
Определения
defaultconnector.php:52
Bitrix\Vote\Attachment\DefaultConnector\canRead
canRead($userId)
Определения
defaultconnector.php:20
Bitrix\Vote\Attachment\DefaultConnector\isStorable
isStorable()
Определения
defaultconnector.php:60
Bitrix\Vote\Attachment\DefaultConnector\setStorage
setStorage(Channel $channel)
Определения
defaultconnector.php:42
Bitrix\Vote\Channel
Определения
channel.php:225
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Vote\Attachment\Storable
Определения
storable.php:8
$storage
if(empty($decryptedData)) $storage
Определения
quickway.php:270
bitrix
modules
vote
lib
attachment
defaultconnector.php
Создано системой
1.14.0