1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
userfieldaccess.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Catalog\UserField
;
4
5
use
Bitrix\Catalog\Controller\Controller
;
6
use
Bitrix\Catalog\Document\StoreDocumentTableManager
;
7
use
Bitrix\Catalog\StoreTable
;
8
use
Bitrix\Main\Loader
;
9
10
class
UserFieldAccess
extends
\Bitrix\Main\UserField\UserFieldAccess
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,
20
StoreTable::getUfId
(),
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
}
Bitrix\Catalog\Document\StoreDocumentTableManager
Определения
storedocumenttablemanager.php:14
Bitrix\Catalog\StoreTable
Определения
store.php:57
Bitrix\Catalog\StoreTable\getUfId
static getUfId()
Определения
store.php:265
Bitrix\Catalog\UserField\UserFieldAccess
Определения
userfieldaccess.php:11
Bitrix\Catalog\UserField\UserFieldAccess\getRestrictedTypes
getRestrictedTypes()
Определения
userfieldaccess.php:51
Bitrix\Catalog\UserField\UserFieldAccess\getAvailableEntityIds
getAvailableEntityIds()
Определения
userfieldaccess.php:12
Bitrix\Catalog\UserField\UserFieldAccess\getIBlockList
static getIBlockList()
Определения
userfieldaccess.php:24
Bitrix\Main\Loader
Определения
loader.php:13
Bitrix\Main\UserField\UserFieldAccess
Определения
userfieldaccess.php:12
CCatalog\GetList
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
Определения
catalog.php:15
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$iblock
if(! $catalogEdit->isSuccess()) $iblock
Определения
iblock_catalog_edit.php:38
$filter
$filter
Определения
iblock_catalog_list.php:54
$l
$l
Определения
options.php:783
Bitrix\Catalog\Controller
Bitrix\Catalog\UserField
Определения
userfieldaccess.php:3
$iterator
$iterator
Определения
yandex_run.php:610
bitrix
modules
catalog
lib
userfield
userfieldaccess.php
Создано системой
1.14.0