Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
WorkflowStateFilter.php
1
<?php
2
3
namespace
Bitrix\Bizproc\Api\Data\WorkflowStateService
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
7
class
WorkflowStateFilter
8
{
9
public
const
PRESET_IN_WORK
=
'in_work'
;
10
public
const
PRESET_STARTED
=
'started'
;
11
public
const
PRESET_HAS_TASK
=
'has_task'
;
12
public
const
PRESET_ALL_COMPLETED
=
'all_completed'
;
13
public
const
PRESET_DEFAULT
=
self::PRESET_IN_WORK
;
14
15
public
static
function
getPresetList
(): array
16
{
17
return
[
18
[
19
'id'
=> static::PRESET_IN_WORK,
20
'name'
=>
Loc::getMessage
(
'BIZPROC_API_DATA_WORKFLOW_STATE_FILTER_PRESET_IN_WORK'
),
21
'default'
=>
true
,
22
],
23
[
24
'id'
=> static::PRESET_STARTED,
25
'name'
=>
Loc::getMessage
(
'BIZPROC_API_DATA_WORKFLOW_STATE_FILTER_PRESET_STARTED'
),
26
],
27
[
28
'id'
=> static::PRESET_HAS_TASK,
29
'name'
=>
Loc::getMessage
(
'BIZPROC_API_DATA_WORKFLOW_STATE_FILTER_PRESET_HAS_TASK'
),
30
],
31
[
32
'id'
=> static::PRESET_ALL_COMPLETED,
33
'name'
=>
Loc::getMessage
(
'BIZPROC_API_DATA_WORKFLOW_STATE_FILTER_PRESET_ALL_COMPLETED'
),
34
],
35
];
36
}
37
38
public
static
function
isDefined
(
string
$presetId): bool
39
{
40
return
in_array($presetId, array_column(static::getPresetList(),
'id'
),
true
);
41
}
42
}
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter
Definition
WorkflowStateFilter.php:8
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\PRESET_HAS_TASK
const PRESET_HAS_TASK
Definition
WorkflowStateFilter.php:11
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\getPresetList
static getPresetList()
Definition
WorkflowStateFilter.php:15
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\PRESET_DEFAULT
const PRESET_DEFAULT
Definition
WorkflowStateFilter.php:13
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\PRESET_IN_WORK
const PRESET_IN_WORK
Definition
WorkflowStateFilter.php:9
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\PRESET_ALL_COMPLETED
const PRESET_ALL_COMPLETED
Definition
WorkflowStateFilter.php:12
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\PRESET_STARTED
const PRESET_STARTED
Definition
WorkflowStateFilter.php:10
Bitrix\Bizproc\Api\Data\WorkflowStateService\WorkflowStateFilter\isDefined
static isDefined(string $presetId)
Definition
WorkflowStateFilter.php:38
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\Bizproc\Api\Data\WorkflowStateService
Definition
WorkflowStateFilter.php:3
modules
bizproc
lib
Api
Data
WorkflowStateService
WorkflowStateFilter.php
Создано системой
1.10.0