Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
workflowmetadatatable.php
1<?php
2
4
10
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}