Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
condition.php
1
<?php
2
namespace
Bitrix\Bizproc\Automation\Engine
;
3
4
use
Bitrix\Bizproc
;
5
use
Bitrix\Bizproc\Automation\Target\BaseTarget
;
6
use
Bitrix\Bizproc\FieldType
;
7
8
class
Condition
extends
Bizproc\Activity\Condition
9
{
10
protected
$object
=
'Document'
;
11
protected
$field
;
12
13
public
function
__construct
(array $params =
null
)
14
{
15
parent::__construct($params);
16
17
if
($params && isset($params[
'field'
]))
18
{
19
$this->
setField
($params[
'field'
]);
20
}
21
if
($params && isset($params[
'object'
]))
22
{
23
$this->
setObject
($params[
'object'
]);
24
}
25
}
26
31
public
function
setField
(
string
$field
)
32
{
33
$this->field = (string)
$field
;
34
return
$this;
35
}
36
40
public
function
getField
()
41
{
42
return
$this->field
;
43
}
44
49
public
function
setObject
(
string
$objectName)
50
{
51
$this->
object
= $objectName;
52
return
$this;
53
}
54
58
public
function
getObject
()
59
{
60
return
$this->object
;
61
}
62
70
public
function
check
($needle, $fieldType,
BaseTarget
$target,
FieldType
$fieldTypeObject)
71
{
72
$documentId = $target->
getDocumentType
();
73
$documentId[2] = $target->
getDocumentId
();
74
75
return
$this->
checkValue
($needle, $fieldTypeObject, $documentId);
76
}
77
81
public
function
toArray
()
82
{
83
$array = parent::toArray();
84
$array[
'field'
] = $this->
getField
();
85
$array[
'object'
] = $this->
getObject
();
86
87
return
$array;
88
}
89
}
Bitrix\Bizproc\Activity\Condition
Definition
condition.php:22
Bitrix\Bizproc\Activity\Condition\checkValue
checkValue($valueToCheck, FieldType $fieldType, array $documentId)
Definition
condition.php:83
Bitrix\Bizproc\Automation\Engine\Condition
Definition
condition.php:9
Bitrix\Bizproc\Automation\Engine\Condition\setObject
setObject(string $objectName)
Definition
condition.php:49
Bitrix\Bizproc\Automation\Engine\Condition\__construct
__construct(array $params=null)
Definition
condition.php:13
Bitrix\Bizproc\Automation\Engine\Condition\setField
setField(string $field)
Definition
condition.php:31
Bitrix\Bizproc\Automation\Engine\Condition\check
check($needle, $fieldType, BaseTarget $target, FieldType $fieldTypeObject)
Definition
condition.php:70
Bitrix\Bizproc\Automation\Engine\Condition\$object
$object
Definition
condition.php:10
Bitrix\Bizproc\Automation\Engine\Condition\toArray
toArray()
Definition
condition.php:81
Bitrix\Bizproc\Automation\Engine\Condition\getField
getField()
Definition
condition.php:40
Bitrix\Bizproc\Automation\Engine\Condition\$field
$field
Definition
condition.php:11
Bitrix\Bizproc\Automation\Engine\Condition\getObject
getObject()
Definition
condition.php:58
Bitrix\Bizproc\Automation\Target\BaseTarget
Definition
basetarget.php:11
Bitrix\Bizproc\Automation\Target\BaseTarget\getDocumentId
getDocumentId()
Definition
basetarget.php:293
Bitrix\Bizproc\Automation\Target\BaseTarget\getDocumentType
getDocumentType()
Definition
basetarget.php:288
Bitrix\Bizproc\FieldType
Definition
fieldtype.php:12
Bitrix\Bizproc\Automation\Engine
Definition
condition.php:2
Bitrix\Bizproc
modules
bizproc
lib
automation
engine
condition.php
Создано системой
1.10.0