1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
containoperator.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Bizproc\Activity\Operator;
4
5
use Bitrix\Bizproc\FieldType;
6
use Bitrix\Main\Localization\Loc;
7
8
class
ContainOperator
extends
BaseOperator
9
{
10
public
static
function
getCode
(): string
11
{
12
return
'contain'
;
13
}
14
15
public
static
function
getTitle
(): string
16
{
17
return
Loc::getMessage(
'BIZPROC_ACTIVITY_CONDITION_OPERATORS_CONTAIN_OPERATOR_TITLE'
) ??
''
;
18
}
19
20
public
function
__construct
(
$toCheck
,
$value
,
FieldType
$fieldType
)
21
{
22
parent::__construct(
$toCheck
,
$value
,
$fieldType
);
23
24
$this->value = is_array($this->value) ? $this->value : [
$this->value
];
25
$this->toCheck = is_array($this->toCheck) ? $this->toCheck : [
$this->toCheck
];
26
}
27
28
public
function
check
(): bool
29
{
30
$baseType = $this->fieldType->getBaseType();
31
if
($baseType ===
'user'
)
32
{
33
return
count
(array_diff($this->value, $this->toCheck)) === 0;
34
}
35
36
$result
=
false
;
37
foreach
(\CBPHelper::flatten($this->value) as $v)
38
{
39
foreach
($this->toCheck as
$f
)
40
{
41
if
(is_array(
$f
))
42
{
43
$result
= in_array($v,
$f
,
false
);
44
}
45
elseif
(
46
\CBPHelper::hasStringRepresentation(
$f
)
47
&& \CBPHelper::hasStringRepresentation($v)
48
&& (
string
)$v !==
''
49
)
50
{
51
$result
= (mb_strpos(
$f
, $v) !==
false
);
52
}
53
54
if
(
$result
)
55
{
56
break
;
57
}
58
}
59
60
if
(!
$result
)
61
{
62
break
;
63
}
64
}
65
66
return
$result
;
67
}
68
}
Bitrix\Bizproc\Activity\Operator\BaseOperator
Определения
baseoperator.php:8
Bitrix\Bizproc\Activity\Operator\BaseOperator\$value
$value
Определения
baseoperator.php:10
Bitrix\Bizproc\Activity\Operator\BaseOperator\$fieldType
FieldType $fieldType
Определения
baseoperator.php:11
Bitrix\Bizproc\Activity\Operator\BaseOperator\$toCheck
$toCheck
Определения
baseoperator.php:9
Bitrix\Bizproc\Activity\Operator\ContainOperator
Определения
containoperator.php:9
Bitrix\Bizproc\Activity\Operator\ContainOperator\getCode
static getCode()
Определения
containoperator.php:10
Bitrix\Bizproc\Activity\Operator\ContainOperator\check
check()
Определения
containoperator.php:28
Bitrix\Bizproc\Activity\Operator\ContainOperator\__construct
__construct($toCheck, $value, FieldType $fieldType)
Определения
containoperator.php:20
Bitrix\Bizproc\Activity\Operator\ContainOperator\getTitle
static getTitle()
Определения
containoperator.php:15
Bitrix\Bizproc\FieldType
Определения
fieldtype.php:12
$f
$f
Определения
component_props.php:52
$result
$result
Определения
get_property_values.php:14
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
count
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения
waybill.php:936
bitrix
modules
bizproc
lib
activity
operator
containoperator.php
Создано системой
1.14.0