Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
workflowstate.php
1
<?php
2
3
namespace
Bitrix\Bizproc\Workflow\Entity
;
4
5
use
Bitrix\Bizproc\Workflow\Task\TaskTable
;
6
use
Bitrix\Bizproc\Workflow\WorkflowState
;
7
use
Bitrix\Main
;
8
use
Bitrix\Main\Entity
;
9
26
class
WorkflowStateTable
extends
Entity\DataManager
27
{
31
public
static
function
getTableName
()
32
{
33
return
'b_bp_workflow_state'
;
34
}
35
39
public
static
function
getObjectClass
()
40
{
41
return
WorkflowState::class;
42
}
43
47
public
static
function
getMap
()
48
{
49
return
[
50
'ID'
=> [
51
'data_type'
=>
'string'
,
52
'primary'
=>
true
,
53
],
54
'MODULE_ID'
=> [
55
'data_type'
=>
'string'
,
56
],
57
'ENTITY'
=> [
58
'data_type'
=>
'string'
,
59
],
60
'DOCUMENT_ID'
=> [
61
'data_type'
=>
'string'
,
62
],
63
'DOCUMENT_ID_INT'
=> [
64
'data_type'
=>
'integer'
,
65
],
66
'WORKFLOW_TEMPLATE_ID'
=> [
67
'data_type'
=>
'integer'
,
68
],
69
'STATE'
=> [
70
'data_type'
=>
'string'
,
71
],
72
'STATE_TITLE'
=> [
73
'data_type'
=>
'string'
,
74
],
75
'STATE_PARAMETERS'
=> [
76
'data_type'
=>
'string'
,
77
],
78
'MODIFIED'
=> [
79
'data_type'
=>
'datetime'
,
80
],
81
'STARTED'
=> [
82
'data_type'
=>
'datetime'
,
83
],
84
'STARTED_BY'
=> [
85
'data_type'
=>
'integer'
,
86
],
87
'STARTED_USER'
=> [
88
'data_type'
=>
'\Bitrix\Main\UserTable'
,
89
'reference'
=> [
90
'=this.STARTED_BY'
=>
'ref.ID'
,
91
],
92
'join_type'
=>
'LEFT'
,
93
],
94
'INSTANCE'
=> [
95
'data_type'
=>
'\Bitrix\Bizproc\Workflow\Entity\WorkflowInstanceTable'
,
96
'reference'
=> [
97
'=this.ID'
=>
'ref.ID'
,
98
],
99
'join_type'
=>
'LEFT'
,
100
],
101
'TEMPLATE'
=> [
102
'data_type'
=>
'\Bitrix\Bizproc\WorkflowTemplateTable'
,
103
'reference'
=> [
104
'=this.WORKFLOW_TEMPLATE_ID'
=>
'ref.ID'
,
105
],
106
'join_type'
=>
'LEFT'
,
107
],
108
new
Main\ORM\Fields\Relations\OneToMany
(
109
'TASKS'
,
110
TaskTable::class,
111
'WORKFLOW_STATE'
112
),
113
];
114
}
115
116
public
static
function
getIdsByDocument
(array $documentId)
117
{
118
$documentId = \CBPHelper::ParseDocumentId($documentId);
119
$rows = static::getList([
120
'select'
=> [
'ID'
],
121
'filter'
=> [
122
'=MODULE_ID'
=> $documentId[0],
123
'=ENTITY'
=> $documentId[1],
124
'=DOCUMENT_ID'
=> $documentId[2]
125
]
126
])->fetchAll();
127
128
return
array_column($rows,
'ID'
);
129
}
130
136
public
static
function
add
(array $data)
137
{
138
throw
new
Main\NotImplementedException
(
"Use CBPStateService class."
);
139
}
140
147
public
static
function
update
($primary, array $data)
148
{
149
throw
new
Main\NotImplementedException
(
"Use CBPStateService class."
);
150
}
151
157
public
static
function
delete
($primary)
158
{
159
throw
new
Main\NotImplementedException
(
"Use CBPStateService class."
);
160
}
161
}
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable
Definition
workflowstate.php:27
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable\getMap
static getMap()
Definition
workflowstate.php:47
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable\getIdsByDocument
static getIdsByDocument(array $documentId)
Definition
workflowstate.php:116
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable\add
static add(array $data)
Definition
workflowstate.php:136
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable\getObjectClass
static getObjectClass()
Definition
workflowstate.php:39
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable\update
static update($primary, array $data)
Definition
workflowstate.php:147
Bitrix\Bizproc\Workflow\Entity\WorkflowStateTable\getTableName
static getTableName()
Definition
workflowstate.php:31
Bitrix\Bizproc\Workflow\Task\TaskTable
Definition
tasktable.php:31
Bitrix\Bizproc\Workflow\WorkflowState
Definition
workflowstate.php:8
Bitrix\Main\NotImplementedException
Definition
exception.php:147
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Main\ORM\Fields\Relations\OneToMany
Definition
onetomany.php:23
Bitrix\Bizproc\Workflow\Entity
Definition
workflowdurationstattable.php:3
Bitrix\Main
modules
bizproc
lib
workflow
entity
workflowstate.php
Создано системой
1.10.0