Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
lockstatusprovider.php
1
<?php
2
3
namespace
Bitrix\Iblock\Grid\Column
;
4
5
use
Bitrix\Main\Grid
;
6
use
Bitrix\Main\Localization\Loc
;
7
8
abstract
class
LockStatusProvider
extends
BaseElementProvider
9
{
10
public
function
prepareColumns
(): array
11
{
12
if
($this->
isSkuSelectorEnabled
())
13
{
14
return
[];
15
}
16
if
(!$this->
usedWorkflow
() && !$this->
usedBusinessProcesses
())
17
{
18
return
[];
19
}
20
21
return
$this->
createColumns
([
22
'LOCK_STATUS'
=> [
23
'type'
=>
Grid
\
Column
\Type::CUSTOM,
24
'name'
=>
Loc::getMessage
(
'IBLOCK_LOCK_STATUS_ELEMENT_COLUMN_PROVIDER_FIELD_LOCK_STATUS'
),
25
'necessary'
=>
true
,
26
'editable'
=>
false
,
27
'multiple'
=>
false
,
28
'align'
=>
'center'
,
29
],
30
]);
31
}
32
33
protected
function
usedWorkflow
(): bool
34
{
35
return
$this->
getSettings
()->isUseWorkflow();
36
}
37
38
protected
function
usedBusinessProcesses
(): bool
39
{
40
return
$this->
getSettings
()->isUseBusinessProcesses();
41
}
42
}
Bitrix\Iblock\Grid\Column\BaseElementProvider
Definition
baseelementprovider.php:12
Bitrix\Iblock\Grid\Column\BaseElementProvider\isSkuSelectorEnabled
isSkuSelectorEnabled()
Definition
baseelementprovider.php:23
Bitrix\Iblock\Grid\Column\LockStatusProvider
Definition
lockstatusprovider.php:9
Bitrix\Iblock\Grid\Column\LockStatusProvider\usedWorkflow
usedWorkflow()
Definition
lockstatusprovider.php:33
Bitrix\Iblock\Grid\Column\LockStatusProvider\prepareColumns
prepareColumns()
Definition
lockstatusprovider.php:10
Bitrix\Iblock\Grid\Column\LockStatusProvider\usedBusinessProcesses
usedBusinessProcesses()
Definition
lockstatusprovider.php:38
Bitrix\Main\Grid\Column\Column
Definition
column.php:13
Bitrix\Main\Grid\Column\DataProvider\createColumns
createColumns(array $columns)
Definition
dataprovider.php:61
Bitrix\Main\Grid\Column\DataProvider\getSettings
getSettings()
Definition
dataprovider.php:31
Bitrix\Main\Grid\Grid
Definition
grid.php:74
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\Grid\Column
Definition
baseelementprovider.php:3
Bitrix\Main\Grid
modules
iblock
lib
grid
column
lockstatusprovider.php
Создано системой
1.10.0