Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
WorkflowStateFilter.php
1<?php
2
4
6
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';
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}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29