Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
producttypefieldassembler.php
1
<?php
2
3
namespace
Bitrix\Catalog\Grid\Row\Assembler
;
4
5
use
Bitrix\Catalog\ProductTable
;
6
use
Bitrix\Main\Grid\Row\Assembler\Field\ListFieldAssembler
;
7
use
Bitrix\Main\Localization\Loc
;
8
9
final
class
ProductTypeFieldAssembler
extends
ListFieldAssembler
10
{
14
protected
function
getNames
(): array
15
{
16
return
ProductTable::getProductTypes
(
true
);
17
}
18
22
protected
function
prepareRow
(array $row): array
23
{
24
$row = parent::prepareRow($row);
25
26
$bundle = $row[
'data'
][
'BUNDLE'
] ??
null
;
27
if
($bundle ===
'Y'
)
28
{
29
$row[
'columns'
][
'TYPE'
] =
Loc::getMessage
(
'CATALOG_GRID_ROW_ASSEMBLER_PRODUCT_TYPE_BUNDLE_NAME'
, [
30
'#TYPE#'
=> $row[
'columns'
][
'TYPE'
],
31
]);
32
33
return
$row;
34
}
35
36
return
$row;
37
}
38
}
Bitrix\Catalog\Grid\Row\Assembler\ProductTypeFieldAssembler
Definition
producttypefieldassembler.php:10
Bitrix\Catalog\Grid\Row\Assembler\ProductTypeFieldAssembler\getNames
getNames()
Definition
producttypefieldassembler.php:14
Bitrix\Catalog\Grid\Row\Assembler\ProductTypeFieldAssembler\prepareRow
prepareRow(array $row)
Definition
producttypefieldassembler.php:22
Bitrix\Catalog\ProductTable
Definition
product.php:63
Bitrix\Catalog\ProductTable\getProductTypes
static getProductTypes($descr=false)
Definition
product.php:824
Bitrix\Main\Grid\Row\Assembler\Field\ListFieldAssembler
Definition
listfieldassembler.php:11
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\Catalog\Grid\Row\Assembler
modules
catalog
lib
grid
row
assembler
producttypefieldassembler.php
Создано системой
1.10.0