Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
FriendlyPropertyProvider.php
1
<?php
2
3
namespace
Bitrix\Iblock\Integration\UI\EntityEditor
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
7
final
class
FriendlyPropertyProvider
extends
PropertyProvider
8
{
9
public
const
FEATURE_PUBLIC_PROPERTY
=
'IS_PUBLIC'
;
10
11
public
function
getEntityFields
(): array
12
{
13
$fields = parent::getEntityFields();
14
$fields[] = [
15
'name'
=>
self::FEATURE_PUBLIC_PROPERTY
,
16
'title'
=>
Loc::getMessage
(
'IBLOCK_ENTITY_EDITOR_FRIENDLY_PROPERTY_FEATURE_PUBLIC'
),
17
'type'
=>
'boolean'
,
18
'default_value'
=>
'Y'
,
19
];
20
$fields = $this->removeDifficultFields($fields);
21
22
return
$fields;
23
}
24
25
public
function
getAdditionalFields
(): array
26
{
27
$fields = parent::getAdditionalFields();
28
$fields = $this->removeDifficultFields($fields);
29
30
return
$fields;
31
}
32
33
private
function
removeDifficultFields(array $fields): array
34
{
35
$names = array_fill_keys([
36
'WITH_DESCRIPTION'
,
37
'COL_COUNT'
,
38
'ROW_COUNT'
,
39
'MULTIPLE_CNT'
,
40
'SECTION_PROPERTY'
,
41
'FEATURES[iblock:LIST_PAGE_SHOW]'
,
42
'FEATURES[iblock:DETAIL_PAGE_SHOW]'
,
43
],
true
);
44
45
return
array_filter($fields,
static
fn(array $field) => !isset($names[$field[
'name'
]]));
46
}
47
}
Bitrix\Iblock\Integration\UI\EntityEditor\FriendlyPropertyProvider
Definition
FriendlyPropertyProvider.php:8
Bitrix\Iblock\Integration\UI\EntityEditor\FriendlyPropertyProvider\getAdditionalFields
getAdditionalFields()
Definition
FriendlyPropertyProvider.php:25
Bitrix\Iblock\Integration\UI\EntityEditor\FriendlyPropertyProvider\getEntityFields
getEntityFields()
Definition
FriendlyPropertyProvider.php:11
Bitrix\Iblock\Integration\UI\EntityEditor\FriendlyPropertyProvider\FEATURE_PUBLIC_PROPERTY
const FEATURE_PUBLIC_PROPERTY
Definition
FriendlyPropertyProvider.php:9
Bitrix\Iblock\Integration\UI\EntityEditor\PropertyProvider
Definition
PropertyProvider.php:22
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Iblock\Integration\UI\EntityEditor
Definition
FriendlyPropertyProvider.php:3
modules
iblock
lib
Integration
UI
EntityEditor
FriendlyPropertyProvider.php
Создано системой
1.10.0