• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/activity/operator/inoperator.php
  • Класс: BitrixBizprocActivityOperatorInOperator
  • Вызов: InOperator::check
public function check(): bool
{
	$toCheck = $this->toCheck;
	$value = $this->value;

	$result = false;
	foreach (CBPHelper::flatten($toCheck) as $f)
	{
		if (is_array($value))
		{
			$result = in_array($f, $value, false);
		}
		elseif (
			CBPHelper::hasStringRepresentation($value)
			&& CBPHelper::hasStringRepresentation($f)
			&& (string)$f !== ''
		)
		{
			$result = (mb_strpos($value, $f) !== false);
		}

		if (!$result)
		{
			break;
		}
	}

	return $result;
}