Sulu\Bundle\ResourceBundle\Resource\FilterListBuilder::createExpression PHP Метод

createExpression() защищенный Метод

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