3namespace Bitrix\Calendar\Access;
5use Bitrix\Calendar\Access\Model\SectionModel;
6use Bitrix\Calendar\Access\Model\UserModel;
7use Bitrix\Main\Access\AccessibleItem;
8use Bitrix\Main\Access\BaseAccessController;
9use Bitrix\Main\Access\User\AccessibleUser;
10use Bitrix\Calendar\Core\Mappers\Section;
16 private const ITEM_TYPE =
'SECTION';
17 private const USER_TYPE =
'USER';
21 $key = self::ITEM_TYPE .
'_' . $itemId;
22 if (!array_key_exists(
$key, static::$cache))
25 $section = (
new Section())->getById($itemId);
27 $sectionModel = SectionModel::createFromId($itemId);
30 $owner = $section->getOwner();
31 $ownerId = $owner ? $owner->getId() : 0;
33 ->setType($section->getType())
34 ->setOwnerId($ownerId)
38 static::$cache[
$key] = $sectionModel;
41 return static::$cache[
$key];
47 if (!array_key_exists(
$key, static::$cache))
49 static::$cache[
$key] = UserModel::createFromId(
$userId);
52 return static::$cache[
$key];
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
loadItem(int $itemId=null)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(empty($signedUserToken)) $key