1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
employeeservice.php
См. документацию.
1<?php
2
4
5use Bitrix\HumanResources\Item\Structure;
6use Bitrix\HumanResources\Service\Container;
7
9{
10 public function getUserIds(int $limit, int $offset): array
11 {
12 if (!$this->isModuleInstalled())
13 {
14 return [];
15 }
16
17 $structure = Container::getStructureRepository()->getByXmlId(Structure::DEFAULT_STRUCTURE_XML_ID);
18 $rootNode = Container::getNodeRepository()->getRootNodeByStructureId($structure->id);
19
20 $employees = Container::getNodeMemberService()->getPagedEmployees(
21 $rootNode->id,
22 true,
23 $offset,
24 $limit
25 );
26
27 $userIds = [];
28
29 foreach ($employees as $employee)
30 {
31 $userIds[] = $employee->entityId;
32 }
33
34 return $userIds;
35 }
36
37 private function isModuleInstalled(): bool
38 {
39 return \Bitrix\Main\Loader::includeModule('humanresources');
40 }
41}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804