1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
schedulerevent.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Bizproc;
4
5
use Bitrix\Main;;
6
23
class
SchedulerEventTable
extends
Main\Entity\DataManager
24
{
28
public
static
function
getTableName
()
29
{
30
return
'b_bp_scheduler_event'
;
31
}
32
36
public
static
function
getMap
()
37
{
38
return
array
(
39
'ID'
=>
array
(
40
'data_type'
=>
'integer'
,
41
'primary'
=>
true
,
42
'autocomplete'
=>
true
,
43
),
44
'WORKFLOW_ID'
=>
array
(
45
'data_type'
=>
'string'
46
),
47
'HANDLER'
=>
array
(
48
'data_type'
=>
'string'
49
),
50
'EVENT_MODULE'
=>
array
(
51
'data_type'
=>
'string'
52
),
53
'EVENT_TYPE'
=>
array
(
54
'data_type'
=>
'string'
55
),
56
'ENTITY_ID'
=>
array
(
57
'data_type'
=>
'string'
58
),
59
'EVENT_PARAMETERS'
=>
array
(
60
'data_type'
=>
'text'
,
61
'serialized'
=>
true
62
)
63
);
64
}
65
66
public
static
function
deleteBySubscription
($workflowId, $handler, $eventModule, $eventType,
$entityId
=
null
)
67
{
68
$connection
=
Main\Application::getConnection
();
69
$sqlHelper =
$connection
->getSqlHelper();
70
71
$table
= $sqlHelper->forSql(static::getTableName());
72
$workflowId = $sqlHelper->forSql($workflowId);
73
$handler = $sqlHelper->forSql($handler);
74
$eventModule = $sqlHelper->forSql($eventModule);
75
$eventType = $sqlHelper->forSql($eventType);
76
$entityId
=
$entityId
!==
null
? $sqlHelper->forSql(
$entityId
) :
null
;
77
78
$connection
->queryExecute(
"DELETE
79
FROM {$table}
80
WHERE
81
WORKFLOW_ID = '{$workflowId}'
82
AND HANDLER = '{$handler}'
83
AND EVENT_MODULE = '{$eventModule}'
84
AND EVENT_TYPE = '{$eventType}'"
85
.(
$entityId
!==
null
?
" AND ENTITY_ID = '{$entityId}'"
:
''
)
86
);
87
}
88
89
public
static
function
deleteByWorkflow
($workflowId)
90
{
91
$connection
=
Main\Application::getConnection
();
92
$sqlHelper =
$connection
->getSqlHelper();
93
94
$table
= $sqlHelper->forSql(static::getTableName());
95
$workflowId = $sqlHelper->forSql($workflowId);
96
97
$connection
->queryExecute(
"DELETE FROM {$table} WHERE WORKFLOW_ID = '{$workflowId}'"
);
98
}
99
100
public
static
function
isSubscribed
($workflowId, $handler, $eventModule, $eventType,
$entityId
=
null
)
101
{
102
$filter
=
array
(
103
'=WORKFLOW_ID'
=> (
string
)$workflowId,
104
'=HANDLER'
=> (
string
)$handler,
105
'=EVENT_MODULE'
=> (
string
)$eventModule,
106
'=EVENT_TYPE'
=> (
string
)$eventType
107
);
108
109
if
(
$entityId
!==
null
)
110
$filter
[
'=ENTITY_ID'
] = (string)
$entityId
;
111
112
$row = static::getList(
array
(
113
'select'
=>
array
(
'ID'
),
114
'filter'
=>
$filter
115
))->fetch();
116
117
return
(is_array($row));
118
}
119
120
public
static
function
hasSubscriptions
($eventModule, $eventType)
121
{
122
$filter
=
array
(
123
'=EVENT_MODULE'
=> $eventModule,
124
'=EVENT_TYPE'
=> $eventType
125
);
126
127
$row = static::getList(
array
(
128
'select'
=>
array
(
'ID'
),
129
'filter'
=>
$filter
,
130
'limit'
=> 1
131
))->fetch();
132
133
return
(is_array($row));
134
}
135
}
$connection
$connection
Определения
actionsdefinitions.php:38
Bitrix\Bizproc\SchedulerEventTable
Определения
schedulerevent.php:24
Bitrix\Bizproc\SchedulerEventTable\deleteByWorkflow
static deleteByWorkflow($workflowId)
Определения
schedulerevent.php:89
Bitrix\Bizproc\SchedulerEventTable\deleteBySubscription
static deleteBySubscription($workflowId, $handler, $eventModule, $eventType, $entityId=null)
Определения
schedulerevent.php:66
Bitrix\Bizproc\SchedulerEventTable\getMap
static getMap()
Определения
schedulerevent.php:36
Bitrix\Bizproc\SchedulerEventTable\hasSubscriptions
static hasSubscriptions($eventModule, $eventType)
Определения
schedulerevent.php:120
Bitrix\Bizproc\SchedulerEventTable\isSubscribed
static isSubscribed($workflowId, $handler, $eventModule, $eventType, $entityId=null)
Определения
schedulerevent.php:100
Bitrix\Bizproc\SchedulerEventTable\getTableName
static getTableName()
Определения
schedulerevent.php:28
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$filter
$filter
Определения
iblock_catalog_list.php:54
Bitrix\Main\$table
$table
Определения
mysql_to_pgsql.php:36
$entityId
$entityId
Определения
payment.php:4
bitrix
modules
bizproc
lib
schedulerevent.php
Создано системой
1.14.0