1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
GroupItemFactory.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Notification\Group;
4
5
use Bitrix\Im\V2\Common\ContextCustomer;
6
use Bitrix\Im\V2\Notification\Group\SystemGroup\SystemGroupItemFactory;
7
use Bitrix\Im\V2\Notification\Group\UserGroup\UserGroupItemFactory;
8
9
class
GroupItemFactory
10
{
11
use ContextCustomer;
12
13
public
function
makeForCurrentContextUser
():
GroupItemCollection
14
{
15
$userId
= $this->getContext()->getUserId();
16
$isAdmin = $this->getContext()->getUser()->isAdmin();
17
18
$systemItems = (
new
SystemGroupItemFactory
())->makeAllSystemItemsForUser($isAdmin,
$userId
);
19
$userItems = (
new
UserGroupItemFactory
())->makeItemsForUser(
$userId
);
20
21
return
new
GroupItemCollection
(...array_merge($systemItems->getAll(), $userItems->getAll()));
22
}
23
}
$userId
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения
check_mail.php:18
Bitrix\Im\V2\Notification\Group\GroupItemCollection
Определения
GroupItemCollection.php:6
Bitrix\Im\V2\Notification\Group\GroupItemFactory
Определения
GroupItemFactory.php:10
Bitrix\Im\V2\Notification\Group\GroupItemFactory\makeForCurrentContextUser
makeForCurrentContextUser()
Определения
GroupItemFactory.php:13
Bitrix\Im\V2\Notification\Group\SystemGroup\SystemGroupItemFactory
Определения
SystemGroupItemFactory.php:11
Bitrix\Im\V2\Notification\Group\UserGroup\UserGroupItemFactory
Определения
UserGroupItemFactory.php:12
bitrix
modules
im
lib
V2
Notification
Group
GroupItemFactory.php
Создано системой
1.14.0