Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
Consumer.php
1
<?php
2
namespace
Bitrix\UI\Avatar\Mask
;
3
4
use \Bitrix\Main;
5
use
Bitrix\Main\Access\User\AccessibleUser
;
6
use \Bitrix\UI\Avatar;
7
8
class
Consumer
extends
Main\Access\User\UserModel
implements
AccessibleUser
9
{
10
public
const
ACCESS_USER
=
'U'
;
11
12
public
function
getId
()
13
{
14
return
$this->
getUserId
();
15
}
16
17
public
function
getRoles
(): array
18
{
19
return
$this->
getAccessCodes
();
20
}
21
22
public
function
getPermission
(
string
$permissionId,
int
$userFieldId = 0): ?int
23
{
24
return
null
;
25
}
26
27
public
function
getAccessCodes
(): array
28
{
29
return
array_merge(parent::getAccessCodes(), [
30
'UA'
, Main\Access\AccessCode::ACCESS_EMPLOYEE .
'0'
, static::ACCESS_USER . $this->
getId
()]
31
);
32
}
33
34
public
function
useRecentlyMaskId
($id)
35
{
36
Avatar\Model\RecentlyUsedTable::addFromUser($id, $this->
getId
());
37
}
38
}
Bitrix\Main\Access\User\UserModel
Definition
usermodel.php:18
Bitrix\UI\Avatar\Mask\Consumer
Definition
Consumer.php:9
Bitrix\UI\Avatar\Mask\Consumer\useRecentlyMaskId
useRecentlyMaskId($id)
Definition
Consumer.php:34
Bitrix\UI\Avatar\Mask\Consumer\getId
getId()
Definition
Consumer.php:12
Bitrix\UI\Avatar\Mask\Consumer\ACCESS_USER
const ACCESS_USER
Definition
Consumer.php:10
Bitrix\UI\Avatar\Mask\Consumer\getPermission
getPermission(string $permissionId, int $userFieldId=0)
Definition
Consumer.php:22
Bitrix\UI\Avatar\Mask\Consumer\getAccessCodes
getAccessCodes()
Definition
Consumer.php:27
Bitrix\UI\Avatar\Mask\Consumer\getRoles
getRoles()
Definition
Consumer.php:17
Bitrix\Main\Access\User\AccessibleUser
Definition
accessibleuser.php:13
Bitrix\Main\Access\User\AccessibleUser\getUserId
getUserId()
Bitrix\UI\Avatar\Mask
Definition
Access.php:2
modules
ui
lib
Avatar
Mask
Consumer.php
Создано системой
1.10.0