src/Sulu/Bundle/ResourceBundle/Resource/FilterListBuilder.php
protected function createExpression(Condition $condition, $fieldDescriptor)
    {
        $value = $this->getValue($condition);

        // relative date for cases like "within a week" or "within this month"
        if ('between' === $condition->getOperator() && DataTypes::DATETIME_TYPE === $condition->getType()) {
            $this->expressions[] = $this->listBuilder->createBetweenExpression($fieldDescriptor, [$value, new \DateTime()]);
        } else {
            $this->expressions[] = $this->listBuilder->createWhereExpression(
                $fieldDescriptor,
                $value,
                $condition->getOperator()
            );
        }
    }
protected function createExpression(Condition $condition, $fieldDescriptor)
    {
        $value = $this->getValue($condition);

        // relative date for cases like "within a week" or "within this month"
        if ('between' === $condition->getOperator() && DataTypes::DATETIME_TYPE === $condition->getType()) {
            $this->expressions[] = $this->listBuilder->createBetweenExpression($fieldDescriptor, [$value, new \DateTime()]);
        } else {
            $this->expressions[] = $this->listBuilder->createWhereExpression(
                $fieldDescriptor,
                $value,
                $condition->getOperator()
            );
        }
    }
protected function createExpression ( Condition $ condition , $ fieldDescriptor ) { $ value = $ this -> getValue ( $ condition ) ; // relative date for cases like "within a week" or "within this month" if ( 'between' === $ condition -> getOperator ( ) && DataTypes :: DATETIME_TYPE === $ condition -> getType ( ) ) { $ this -> expressions [ ] = $ this -> listBuilder -> createBetweenExpression ( $ fieldDescriptor , [ $ value , new \ DateTime ( ) ] ) ; } else { $ this -> expressions [ ] = $ this -> listBuilder -> createWhereExpression ( $ fieldDescriptor , $ value , $ condition -> getOperator ( ) ) ; } }
Creates expressions from conditions and add them to the expressions array.

@param Condition $condition
@param FieldDescriptorInterface $fieldDescriptor
Creates expressions from conditions and add them to the expressions array .