1C-Bitrix
25.700.0
Toggle main menu visibility
Титульная страница
Пространства имен
Пространства имен
Члены пространств имен
Указатель
$
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Функции
_
a
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
Переменные
$
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
v
w
Перечисления
a
b
c
d
e
f
g
l
m
n
o
p
r
s
t
u
v
w
Элементы перечислений
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Структуры данных
Структуры данных
Алфавитный указатель структур данных
Иерархия классов
Поля структур
Указатель
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Функции
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Переменные
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Перечисления
Элементы перечислений
Файлы
Файлы
Список членов всех файлов
Указатель
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
б
в
к
л
о
п
с
т
ю
Функции
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Переменные
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
б
в
к
л
о
п
с
т
ю
Блог
Хостинг
1C-Bitrix
Пространства имен
Структуры данных
Файлы
Файлы
bitrix
modules
abtest
advertising
b24connector
bitrixcloud
bizproc
bizprocdesigner
blog
calendar
catalog
clouds
cluster
conversion
currency
eshopapp
fileman
form
forum
highloadblock
iblock
classes
lib
bizproctype
component
Controller
copy
filter
FullIndex
grid
access
column
entity
helpers
panel
row
actions
assembler
property
basefieldassembler.php
elementfieldassembler.php
filefieldassembler.php
listfieldassembler.php
multiplefieldassembler.php
numberfieldassembler.php
sectionfieldassembler.php
stringfieldassembler.php
usertypepropertyfieldassembler.php
elementcountfieldassembler.php
intranetuserfieldassembler.php
sectioncountfieldassembler.php
sectionnamefieldassembler.php
elementrowassembler.php
actiontype.php
rowtype.php
helpers
inheritedproperty
Integration
landingsource
model
orm
property
propertyindex
template
UI
update
url
userfield
elementpropertytable.php
elementtable.php
iblock.php
iblockfield.php
iblockgroup.php
iblockmessage.php
iblockrss.php
iblocksite.php
iblocktable.php
inheritedproperty.php
property.php
propertyenumeration.php
propertyfeature.php
propertytable.php
sectionelementtable.php
sectionpropertytable.php
sectiontable.php
senderconnector.php
sequence.php
site.php
type.php
typelanguage.php
meta
.settings.php
admin_tools.php
autoload.php
default_option.php
iblock.php
include.php
options.php
prolog.php
rss.php
idea
im
landing
ldap
learning
lists
location
mail
main
messageservice
mobileapp
perfmon
photogallery
pull
report
rest
sale
scale
search
security
sender
seo
socialnetwork
socialservices
statistic
storeassist
subscribe
support
translate
ui
vote
webservice
wiki
workflow
Список членов всех файлов
Примеры
•
Указатель
Структуры данных
Пространства имен
Файлы
Функции
Переменные
Перечисления
Элементы перечислений
Страницы
Загрузка...
Поиск...
Не найдено
listfieldassembler.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Iblock\Grid\Row\Assembler\Property;
4
5
use Bitrix\Main;
6
use Bitrix\Iblock\Grid\Column\ElementPropertyProvider;
7
use Bitrix\Iblock\PropertyEnumerationTable;
8
use Bitrix\Iblock\PropertyTable;
9
10
final
class
ListFieldAssembler
extends
BaseFieldAssembler
11
{
12
public
function
__construct
(
int
$iblockId
)
13
{
14
parent::__construct(
$iblockId
, []);
15
}
12
public
function
__construct
(
int
$iblockId
) {
…
}
16
17
protected
function
getPropertyFilter
():
array
18
{
19
return
[
20
'=PROPERTY_TYPE'
=>
PropertyTable::TYPE_LIST
,
21
'=USER_TYPE'
=>
null
,
22
];
23
}
17
protected
function
getPropertyFilter
():
array
{
…
}
24
25
protected
function
validateProperty
(
array
$property): ?
array
26
{
27
return
$property;
28
}
25
protected
function
validateProperty
(
array
$property): ?
array
{
…
}
29
30
protected
function
prepareRow
(
array
$row):
array
31
{
32
if
(!self::isElementRow($row))
33
{
34
return
$row;
35
}
36
37
$columnIds = $this->
getColumnIds
();
38
if
(empty($columnIds))
39
{
40
return
$row;
41
}
42
43
$row[
'columns'
] ??= [];
44
45
$columnToPropertyIds = ElementPropertyProvider::getPropertyIdsFromColumnsIds($columnIds);
46
foreach
($columnToPropertyIds as $columnId => $propertyId)
47
{
48
// edit
49
$value = $this->
getColumnValues
($row[
'data'
][$columnId] ??
null
,
'VALUE_ENUM_ID'
);
50
Main\Type\Collection::normalizeArrayValuesByInt
($value,
false
);
51
if
($this->
isMultipleColumn
($columnId))
52
{
53
$row[
'data'
][
'~'
. $columnId] = $value;
54
}
55
else
56
{
57
$row[
'data'
][
'~'
. $columnId] = empty($value) ?
''
: reset($value);
58
}
59
60
// view
61
$value = $this->
getColumnValues
($row[
'data'
][$columnId] ??
null
,
'VALUE'
);
62
$viewValue =
''
;
63
if
(!empty($value))
64
{
65
$viewValue = join(
' / '
, $value);
66
}
67
$viewValue =
Main\Text\HtmlFilter::encode
($viewValue);
68
$row[
'columns'
][$columnId] ??= $viewValue;
69
}
70
71
/*
72
$columnToPropertyIds = ElementPropertyProvider::getPropertyIdsFromColumnsIds($columnIds);
73
foreach ($columnToPropertyIds as $columnId => $propertyId)
74
{
75
if (isset($row['columns'][$columnId]))
76
{
77
continue;
78
}
79
80
$value = $row['data'][$columnId] ?? null;
81
if (is_array($value))
82
{
83
$tmp = [];
84
foreach ($value as $valueItem)
85
{
86
if (is_numeric($valueItem))
87
{
88
$tmp[] = $this->getEnumValue($propertyId, $valueItem);
89
}
90
else
91
{
92
$tmp[] = $valueItem;
93
}
94
95
}
96
97
$value = join(' / ', $tmp);
98
}
99
elseif (is_numeric($value))
100
{
101
$value = $this->getEnumValue($propertyId, $value);
102
}
103
104
$row['columns'][$columnId] = $value;
105
}
106
107
*/
108
109
return
$row;
110
}
30
protected
function
prepareRow
(
array
$row):
array
{
…
}
111
}
10
final
class
ListFieldAssembler
extends
BaseFieldAssembler
{
…
};
Bitrix\Iblock\Grid\Row\Assembler\Property\BaseFieldAssembler
Определения
basefieldassembler.php:13
Bitrix\Iblock\Grid\Row\Assembler\Property\BaseFieldAssembler\isMultipleColumn
isMultipleColumn(string $columnId)
Определения
basefieldassembler.php:116
Bitrix\Iblock\Grid\Row\Assembler\Property\BaseFieldAssembler\$iblockId
int $iblockId
Определения
basefieldassembler.php:17
Bitrix\Iblock\Grid\Row\Assembler\Property\BaseFieldAssembler\getColumnValues
getColumnValues(mixed $rawValues, string $fieldName='VALUE')
Определения
basefieldassembler.php:128
Bitrix\Iblock\Grid\Row\Assembler\Property\ListFieldAssembler
Определения
listfieldassembler.php:11
Bitrix\Iblock\Grid\Row\Assembler\Property\ListFieldAssembler\getPropertyFilter
getPropertyFilter()
Определения
listfieldassembler.php:17
Bitrix\Iblock\Grid\Row\Assembler\Property\ListFieldAssembler\__construct
__construct(int $iblockId)
Определения
listfieldassembler.php:12
Bitrix\Iblock\Grid\Row\Assembler\Property\ListFieldAssembler\prepareRow
prepareRow(array $row)
Определения
listfieldassembler.php:30
Bitrix\Iblock\Grid\Row\Assembler\Property\ListFieldAssembler\validateProperty
validateProperty(array $property)
Определения
listfieldassembler.php:25
Bitrix\Iblock\PropertyTable\TYPE_LIST
const TYPE_LIST
Определения
propertytable.php:70
Bitrix\Main\Grid\Row\FieldAssembler\getColumnIds
getColumnIds()
Определения
fieldassembler.php:47
Bitrix\Main\Text\HtmlFilter\encode
static encode($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения
htmlfilter.php:12
Bitrix\Main\Type\Collection\normalizeArrayValuesByInt
static normalizeArrayValuesByInt(&$map, $sorted=true)
Определения
collection.php:150
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
bitrix
modules
iblock
lib
grid
row
assembler
property
listfieldassembler.php
Создано системой
1.14.0