1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
categorytrait.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Calendar\Access\Rule\Traits
;
4
5
use
Bitrix\Calendar\Access\ActionDictionary
;
6
use
Bitrix\Calendar\Access\EventCategoryAccessController
;
7
use
Bitrix\Calendar\Access\Model\EventModel
;
8
use
Bitrix\Main\Access\AccessibleController
;
9
10
trait
CategoryTrait
11
{
12
/* @var AccessibleController $controller */
13
protected
$controller;
14
15
private
function
checkCategoryByEvent(
16
EventModel
$eventModel,
17
string
$action
=
ActionDictionary::ACTION_EVENT_CATEGORY_VIEW
18
):
bool
19
{
20
if
(!($categoryId = $eventModel->
getEventCategoryId
()))
21
{
22
return
true
;
23
}
24
25
return
EventCategoryAccessController::can
(
26
userId: $this->controller->getUser()->getUserId(),
27
action:
$action
,
28
itemId: $categoryId,
29
);
30
}
31
}
Bitrix\Calendar\Access\ActionDictionary
Определения
actiondictionary.php:6
Bitrix\Calendar\Access\ActionDictionary\ACTION_EVENT_CATEGORY_VIEW
const ACTION_EVENT_CATEGORY_VIEW
Определения
actiondictionary.php:34
Bitrix\Calendar\Access\EventCategoryAccessController
Определения
eventcategoryaccesscontroller.php:13
Bitrix\Calendar\Access\Model\EventModel
Определения
eventmodel.php:11
Bitrix\Calendar\Access\Model\EventModel\getEventCategoryId
getEventCategoryId()
Определения
eventmodel.php:327
Bitrix\Main\Access\AccessibleController
Определения
accessiblecontroller.php:15
Bitrix\Main\Access\AccessibleController\can
static can($userId, string $action, $itemId=null, $params=null)
Bitrix\Calendar\Access\Rule\Traits
Определения
categorytrait.php:3
Bitrix\Calendar\Access\Rule\Traits\CategoryTrait
trait CategoryTrait
Определения
categorytrait.php:11
$action
$action
Определения
file_dialog.php:21
bitrix
modules
calendar
lib
access
rule
traits
categorytrait.php
Создано системой
1.14.0