- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/lib/activity/condition.php
- Класс: BitrixBizprocActivityCondition
- Вызов: Condition::checkValue
public function checkValue($valueToCheck, FieldType $fieldType, array $documentId)
{
$fieldType = clone($fieldType);
$fieldType->setDocumentId($documentId);
switch ($this->getOperator())
{
case EmptyOperator::getCode():
$operator = new EmptyOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case NotEmptyOperator::getCode():
$operator = new NotEmptyOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case ContainOperator::getCode():
$operator = new ContainOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case NotContainOperator::getCode():
$operator = new NotContainOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case InOperator::getCode():
$operator = new InOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case NotInOperator::getCode():
$operator = new NotInOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case BetweenOperator::getCode():
$operator = new BetweenOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case GreaterThenOperator::getCode():
$operator = new GreaterThenOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case GreaterThenOrEqualOperator::getCode():
$operator = new GreaterThenOrEqualOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case LessThenOperator::getCode():
$operator = new LessThenOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case LessThenOrEqualOperator::getCode():
$operator = new LessThenOrEqualOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case EqualOperator::getCode():
$operator = new EqualOperator($valueToCheck, $this->getValue(), $fieldType);
break;
case NotEqualOperator::getCode():
$operator = new NotEqualOperator($valueToCheck, $this->getValue(), $fieldType);
break;
default:
$operator = new BaseOperator($valueToCheck, $this->getValue(), $fieldType);
}
return $operator->check();
}