Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
workflowmetadatatable.php
1
<?php
2
3
namespace
Bitrix\Bizproc\Workflow\Entity
;
4
5
use
Bitrix\Main\ORM\Data\DataManager
;
6
use
Bitrix\Main\ORM\Fields\IntegerField
;
7
use
Bitrix\Main\ORM\Fields\StringField
;
8
use
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
9
use
Bitrix\Main\ORM\Fields\Validators\RangeValidator
;
10
27
class
WorkflowMetadataTable
extends
DataManager
28
{
29
public
static
function
getTableName
(): string
30
{
31
return
'b_bp_workflow_meta'
;
32
}
33
34
public
static
function
getMap
(): array
35
{
36
return
[
37
(
new
IntegerField
(
'ID'
))
38
->configureAutocomplete()
39
->configurePrimary()
40
,
41
(
new
StringField
(
'WORKFLOW_ID'
))
42
->configureRequired()
43
->configureSize(32)
44
->addValidator(
new
LengthValidator
(1, 32))
45
,
46
(
new
IntegerField
(
'START_DURATION'
))
47
->addValidator(
new
RangeValidator
())
48
,
49
];
50
}
51
52
public
static
function
deleteByWorkflowId
(
string
$workflowId): void
53
{
54
$iterator = static::query()->setFilter([
'WORKFLOW_ID'
=> $workflowId])->exec();
55
56
while
($metadata = $iterator->fetchObject())
57
{
58
$metadata->delete();
59
}
60
}
61
}
Bitrix\Bizproc\Workflow\Entity\WorkflowMetadataTable
Definition
workflowmetadatatable.php:28
Bitrix\Bizproc\Workflow\Entity\WorkflowMetadataTable\getMap
static getMap()
Definition
workflowmetadatatable.php:34
Bitrix\Bizproc\Workflow\Entity\WorkflowMetadataTable\deleteByWorkflowId
static deleteByWorkflowId(string $workflowId)
Definition
workflowmetadatatable.php:52
Bitrix\Bizproc\Workflow\Entity\WorkflowMetadataTable\getTableName
static getTableName()
Definition
workflowmetadatatable.php:29
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Main\ORM\Fields\Validators\RangeValidator
Definition
rangevalidator.php:18
Bitrix\Bizproc\Workflow\Entity
Definition
workflowdurationstattable.php:3
modules
bizproc
lib
workflow
entity
workflowmetadatatable.php
Создано системой
1.10.0