1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
GetMembersTrait.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Control\Member\Trait;
4
5use Bitrix\Main\Type\Collection;
6use Bitrix\Socialnetwork\UserToGroupTable;
7
8trait GetMembersTrait
9{
10 protected function getMemberIds(int $groupId, ?string $role = null): array
11 {
12 $query = UserToGroupTable::query()
13 ->setSelect(['USER_ID'])
14 ->where('GROUP_ID', $groupId)
15 ;
16
17 if ($role !== null)
18 {
19 $query->setFilter(['ROLE' => $role]);
20 }
21
22 $rows = $query->exec()->fetchAll();
23
24 $memberIds = array_column($rows, 'USER_ID');
25
26 Collection::normalizeArrayValuesByInt($memberIds, false);
27
28 return $memberIds;
29 }
30}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$query
Определения get_search.php:11
$rows
Определения options.php:264