@param \Netgen\BlockManager\API\Values\LayoutResolver\Condition $value
@param \Netgen\BlockManager\Transfer\Output\VisitorInterface|null $subVisitor

@return mixed
337520
public function visit($value, ?VisitorInterface $subVisitor = null)
    {
        return [
            'id' => $value->getId(),
            'type' => $value->getConditionType()::getType(),
            'value' => $value->getValue(),
        ];
    }
1124744
public function resolve($value)
    {
        foreach ($this->transformers as $transformer) {
            if ($transformer->supports($value)) {
                return $transformer;
            }
        }

        return new NullTransformer();
    }
650475
public function resolve(
        ValueInterface $value,
        FixtureInterface $fixture,
        ResolvedFixtureSet $fixtureSet,
        array $scope,
        GenerationContext $context
    ): ResolvedValueWithFixtureSet {
        $functionName = $value->getName();
        if (false === function_exists($functionName)
            || array_key_exists($functionName, $this->functionBlacklist)
        ) {
            return $this->resolver->resolve($value, $fixture, $fixtureSet, $scope, $context);
        }

        $arguments = $value->getArguments();

        return new ResolvedValueWithFixtureSet(
            $functionName(...$arguments),
            $fixtureSet
        );
    }
1097941
public function ownerLocale($value)
    {
        Craft::$app->getDeprecator()->log('ElementQuery::ownerLocale()', 'The “ownerLocale” SuperTable block query param has been deprecated. Use “site” or “siteId” instead.');
        $this->ownerSite($value);

        return $this;
    }
695776
protected function Sub( $value )
	{
	    switch ( $value->GetValueCode() )
	    {
	        case TimeProxyFactory::Code:
	            return new DayTimeDurationProxy( TimeValue::Sub( $this->_value, /* TimeValue */ $value->getValue() ) );

	        case DayTimeDurationProxyFactory::Code:
	        	/**
	        	 * @var DayTimeDurationProxy $value
	        	 */
	        	// Clone the DateValue contained in the proxy or the original is changed
	        	$clone = new TimeValue( clone $this->_value->Value );
	        	$value->getValue()->Value->invert = ! $value->getValue()->Value->invert;
	        	return new TimeProxy( TimeValue::AddDayTimeDuration( $clone, $value->getValue() ) );
	        	// return new TimeProxy( TimeValue::Add(  $this->_value, - /* DayTimeDurationValue */ $value->getValue() ) );

	        default:
	            throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:sub",
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $this->_value), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $value->getValue() ), XmlTypeCardinality::One )
					)
				);
	    }
	}
809950
protected function Sub( $value )
	{
	    switch ( $value->GetValueCode() )
	    {
	        case DateProxyFactory::Code:
	            return new DayTimeDurationProxy( DateValue::Sub( $this->_value, /* DateValue */ $value->getValue() ) );

	        case YearMonthDurationProxyFactory::Code:
	        	/**
	        	 * @var YearMonthDurationProxy $value
	        	 */
	        	// Clone the DateValue contained in the proxy or the original is changed
	        	$clone = new DateValue( $this->_value->S, clone $this->_value->Value );
	        	$value->getValue()->Value->invert = ! $value->getValue()->Value->invert;
	        	return new DateProxy( DateValue::AddYearMonthDuration( $clone, $value->getValue() ) );

	        case DayTimeDurationProxyFactory::Code:
	        	/**
	        	 * @var DayTimeDurationProxy $value
	        	 */
	        	// Clone the DateValue contained in the proxy or the original is changed
	        	$clone = new DateValue( $this->_value->S, clone $this->_value->Value );
	        	$value->getValue()->Value->invert = ! $value->getValue()->Value->invert;
	        	return new DateProxy( DateValue::AddDayTimeDuration( $clone, $value->getValue() ) );

	        default:
	            throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:sub",
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $this->_value ), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $value->getValue() ), XmlTypeCardinality::One )
					)
				);
	    }
	}
1323206
public function displayValue( $value )
    {
        if ( isset( $this->values[$value] ) )
        {
            $value = $this->values[$value];
        }

        if ( $this->translationEnabled )
        {
            $value = parent::displayValue( $value );
        }

        return $value;
    }
144131
public function condition($field, $value = NULL, $expressionOperator = NULL)
    {

        if (!isset($expressionOperator)) {
            if (is_array($value)) {
                $expressionOperator = 'IN';
            }
            else {
                $expressionOperator = '=';
            }
        }
        $this->conditions[] = array(
            'field' => $field,
            'value' => $value,
            'operator' => $expressionOperator,
        );
        return $this;
    }
621543
private static function _getCondition($value, array $conditions)
    {
        if (empty($value) || empty($conditions)) {
            return false;
        }

        return current(array_intersect(array_keys($value), $conditions));
    }
248620
public function resolve(
        ValueInterface $value,
        FixtureInterface $fixture,
        ResolvedFixtureSet $fixtureSet,
        array $scope,
        GenerationContext $context
    ): ResolvedValueWithFixtureSet {
        $valueForCurrent = $fixture->getValueForCurrent();

        if ($valueForCurrent instanceof FixtureInterface) {
            $valueForCurrent = new SimpleFixture(
                $valueForCurrent->getId(),
                $valueForCurrent->getClassName(),
                $valueForCurrent->getSpecs(),
                $fixtureSet->getObjects()->get($valueForCurrent)->getInstance()
            );
        } else {
            $valueForCurrent = $fixtureSet->getFixtures()->get($fixture->getId());
        }

        return new ResolvedValueWithFixtureSet(
            $valueForCurrent,
            $fixtureSet
        );
    }
685818
public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null)
    {
        $fieldNames = $this->getFieldNames($criterion);

        if (empty($fieldNames)) {
            throw new InvalidArgumentException(
                '$criterion->target',
                "No searchable fields found for the given criterion target '{$criterion->target}'."
            );
        }

        $queries = [];

        foreach ($fieldNames as $fieldName) {
            $match = $criterion->value[0] === IsFieldEmptyCriterion::IS_EMPTY ? 'true' : 'false';
            $queries[] = "{$fieldName}:{$match}";
        }

        return '(' . implode(' OR ', $queries) . ')';
    }
144453
public function layout($value = null)
    {
        if (null === $value)
            return $this->layout;
        else
            $this->layout = $value;
    }
958254
public function maybe($value, $subPattern = null)
    {
        return $this->add($this->sanitise($value), $subPattern, '?');
    }
34359
public function clickDisplayedElementByID($value, $timeout = 0)
    {
        return $this->clickDisplayedElement(self::BY_ID, $value, $timeout, $timeout);
    }
1040071
private function visitTargets(Rule $rule, VisitorInterface $subVisitor): Generator
    {
        foreach ($rule->getTargets() as $target) {
            yield $target->getId() => $subVisitor->visit($target);
        }
    }
497312
public function resolve(
        ValueInterface $value,
        FixtureInterface $fixture,
        ResolvedFixtureSet $fixtureSet,
        array $scope,
        GenerationContext $context
    ): ResolvedValueWithFixtureSet {
        if (null === $this->resolver) {
            throw ResolverNotFoundExceptionFactory::createUnexpectedCall(__METHOD__);
        }

        $quantifier = $value->getQuantifier();
        if ($quantifier instanceof ValueInterface) {
            $resolvedSet = $this->resolver->resolve($quantifier, $fixture, $fixtureSet, $scope, $context);
            list($quantifier, $fixtureSet) = [$resolvedSet->getValue(), $resolvedSet->getSet()];

            if (false === is_int($quantifier) && false === is_string($quantifier)) {
                throw UnresolvableValueExceptionFactory::createForInvalidResolvedQuantifierTypeForOptionalValue($value, $quantifier);
            }
        }

        $realValue = (mt_rand(0, 99) < $quantifier)
            ? $value->getFirstMember()
            : $value->getSecondMember()
        ;
        if ($realValue instanceof ValueInterface) {
            return $this->resolver->resolve($realValue, $fixture, $fixtureSet, $scope, $context);
        }

        return new ResolvedValueWithFixtureSet($realValue, $fixtureSet);
    }
1242023
public function resolve(
        ValueInterface $value,
        FixtureInterface $fixture,
        ResolvedFixtureSet $fixtureSet,
        array $scope,
        GenerationContext $context
    ): ResolvedValueWithFixtureSet {
        $this->checkResolver(__METHOD__);

        $quantifier = $value->getQuantifier();
        if ($quantifier instanceof ValueInterface) {
            $result = $this->resolver->resolve($quantifier, $fixture, $fixtureSet, $scope, $context);
            list($quantifier, $fixtureSet) = [$result->getValue(), $result->getSet()];
        }

        if ($quantifier < 0) {
            throw InvalidArgumentExceptionFactory::createForInvalidDynamicArrayQuantifier($fixture, $quantifier);
        }

        $element = $value->getElement();
        if (false === $element instanceof ValueInterface) {
            $array = array_fill(0, $quantifier, $element);

            return new ResolvedValueWithFixtureSet($array, $fixtureSet);
        }

        $array = [];
        for ($i = 0; $i < $quantifier; $i++) {
            $result = $this->resolver->resolve($element, $fixture, $fixtureSet, $scope, $context);

            $array[] = $result->getValue();
            $fixtureSet = $result->getSet();
        }

        return new ResolvedValueWithFixtureSet($array, $fixtureSet);
    }