Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
typeaccesscontroller.php
1
<?php
2
3
namespace
Bitrix\Calendar\Access
;
4
5
use
Bitrix\Calendar\Access\Model\SectionModel
;
6
use
Bitrix\Calendar\Access\Model\UserModel
;
7
use
Bitrix\Main\Access\AccessibleItem
;
8
use
Bitrix\Main\Access\BaseAccessController
;
9
use
Bitrix\Main\Access\User\AccessibleUser
;
10
11
class
TypeAccessController
extends
BaseAccessController
12
{
13
public
static
array
$cache
= [];
14
15
private
const
USER_TYPE =
'USER'
;
16
17
protected
function
loadItem
(
int
$itemId =
null
): ?
AccessibleItem
18
{
19
return
null
;
20
}
21
22
protected
function
loadUser
(
int
$userId):
AccessibleUser
23
{
24
$key = self::USER_TYPE .
'_'
. $userId;
25
if
(!array_key_exists($key, static::$cache))
26
{
27
static::$cache[$key] = UserModel::createFromId($userId);
28
}
29
30
return
static::$cache[$key];
31
}
32
}
Bitrix\Calendar\Access\Model\SectionModel
Definition
sectionmodel.php:9
Bitrix\Calendar\Access\Model\UserModel
Definition
usermodel.php:10
Bitrix\Calendar\Access\TypeAccessController
Definition
typeaccesscontroller.php:12
Bitrix\Calendar\Access\TypeAccessController\loadItem
loadItem(int $itemId=null)
Definition
typeaccesscontroller.php:17
Bitrix\Calendar\Access\TypeAccessController\$cache
static array $cache
Definition
typeaccesscontroller.php:13
Bitrix\Calendar\Access\TypeAccessController\loadUser
loadUser(int $userId)
Definition
typeaccesscontroller.php:22
Bitrix\Main\Access\BaseAccessController
Definition
baseaccesscontroller.php:23
Bitrix\Main\Access\AccessibleItem
Definition
accessibleitem.php:13
Bitrix\Main\Access\User\AccessibleUser
Definition
accessibleuser.php:13
Bitrix\Calendar\Access
Definition
accessibleevent.php:3
modules
calendar
lib
access
typeaccesscontroller.php
Создано системой
1.10.0