1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
eventcategoryaccesscontroller.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Access;
4
5use Bitrix\Calendar\Access\Model\EventCategoryModel;
6use Bitrix\Calendar\Access\Model\UserModel;
7use Bitrix\Calendar\Core\Mappers\EventCategory;
8use Bitrix\Main\Access\AccessibleItem;
9use Bitrix\Main\Access\BaseAccessController;
10use Bitrix\Main\Access\User\AccessibleUser;
11
13{
14 public static array $cache = [];
15
16 private const ITEM_TYPE = 'EVENT_CATEGORY';
17 private const USER_TYPE = 'USER';
18
19 protected function loadItem(int $itemId = null): ?AccessibleItem
20 {
21 $key = self::ITEM_TYPE . '_' . $itemId;
22 if (!array_key_exists($key, self::$cache))
23 {
24 $eventCategory = (new EventCategory())->getById($itemId);
25
26 $eventCategoryModel = $eventCategory
29
30 self::$cache[$key] = $eventCategoryModel;
31 }
32
33 return self::$cache[$key];
34 }
35
36 protected function loadUser(int $userId): AccessibleUser
37 {
38 $key = self::USER_TYPE . '_' . $userId;
39 if (!array_key_exists($key, self::$cache))
40 {
41 self::$cache[$key] = UserModel::createFromId($userId);
42 }
43
44 return self::$cache[$key];
45 }
46}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static createFromObject(EventCategory $category)
Определения eventcategorymodel.php:51
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
if(empty($signedUserToken)) $key
Определения quickway.php:257