Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
userfieldaccess.php
1<?php
2
4
9
11{
12 protected function getAvailableEntityIds(): array
13 {
14 $iblockEntities = array_map(fn($item): string => 'IBLOCK_' . $item . '_SECTION', static::getIBlockList());
15 $storeDocsEntities = array_values(StoreDocumentTableManager::getUfEntityIds());
16
17 return [
18 ...$iblockEntities,
19 ...$storeDocsEntities,
21 ];
22 }
23
24 protected static function getIBlockList(): array
25 {
26 Loader::includeModule('catalog');
27 Loader::includeModule('iblock');
28
29 $list = [];
30 $filter = [];
31
32 $r = \CCatalog::GetList();
33 while ($l = $r->fetch())
34 {
35 $filter['ID'] ??= [];
36 $filter['ID'][] = $l['IBLOCK_ID'];
37 }
38
39 $filter['ACTIVE'] = 'Y';
40 $filter['OPERATION'] = Controller::IBLOCK_EDIT;
41
42 $iterator = \CIBlock::GetList(['ID' => 'ASC'], $filter);
43 while ($iblock = $iterator->Fetch())
44 {
45 $list[] = (int)$iblock['ID'];
46 }
47
48 return $list;
49 }
50
51 public function getRestrictedTypes(): array
52 {
53 return array_merge(
54 parent::getRestrictedTypes(),
55 [
56 'video',
57 'vote',
58 'url_preview',
59 'string_formatted',
60 'disk_file',
61 'disk_version',
62 ]
63 );
64 }
65}