20 if (isset($params[
'items']) && is_array($params[
'items']))
22 foreach ($params[
'items'] as $item)
27 if (isset($params[
'parameterDocumentId']) && is_array($params[
'parameterDocumentId']))
29 $this->parameterDocumentId = $params[
'parameterDocumentId'];
40 'joiner' => isset($item[
'joiner']) && $item[
'joiner'] === 0 ? static::JOINER_AND :
self::JOINER_OR,
41 'valueToCheck' => $item[
'valueToCheck'] ??
null,
42 'fieldType' => $item[
'fieldType'] ??
new FieldType([], [],
'Bitrix\Bizproc\BaseType\StringType')
59 public function evaluate(): bool
68 $joiner = $item[
'joiner'];
70 $condition = $item[
'condition'];
72 if ($condition->getOperator() ===
'modified')
75 is_array($condition->getValue()) && in_array($item[
'valueToCheck'], $condition->getValue(),
true)
80 $conditionResult = $condition->checkValue($item[
'valueToCheck'], $item[
'fieldType'], $this->parameterDocumentId);
83 if ($joiner === static::JOINER_OR)
88 elseif (!$conditionResult)
93 $this->result[] = $conditionResult;
96 return (count(array_filter(
$result)) > 0);