1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
EventCategoryResponseHelper.php
См. документацию.
1<?php
2
4
11
13{
15 EventCategory $eventCategory,
16 int $userId = 0,
17 ?bool $isMuted = null,
18 ): Item\Category
19 {
20 $categoryId = $eventCategory->getId();
21 $categoryNewCounters = $userId === 0
22 ? null
25
26 $categoryProvider = new Provider\CategoryProvider();
27
28 return new Item\Category(
29 id: $categoryId,
30 closed: $eventCategory->getClosed(),
31 name: $categoryProvider->prepareCategoryName($eventCategory->getName()),
32 description: $categoryProvider->prepareCategoryDescription($eventCategory->getDescription()),
33 creatorId: $eventCategory->getCreatorId(),
34 eventsCount: $eventCategory->getEventsCount(),
35 permissions: $userId === 0
36 ? new EventCategoryPermissions(false, false)
38 channelId: $eventCategory->getChannelId(),
39 isMuted: $isMuted,
40 newCount: $categoryNewCounters,
41 );
42 }
43}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getPermissionsForObject(EventCategory $category, int $userId)
Определения EventCategoryAccess.php:14
static prepareEventCategoryForUserResponse(EventCategory $eventCategory, int $userId=0, ?bool $isMuted=null,)
Определения EventCategoryResponseHelper.php:14
static getInstance()
Определения application.php:98