PHP Class WellCommerce\Component\DataSet\QueryBuilder\DataSetQueryBuilder

Author: Adam Piotrowski ([email protected])
Inheritance: implements WellCommerce\Component\DataSet\QueryBuilder\DataSetQueryBuilderInterface
显示文件 Open project: wellcommerce/wellcommerce

Public Methods

Method Description
__construct ( WellCommerce\Component\DataSet\Repository\DataSetAwareRepositoryInterface $repository ) DataSetQueryBuilder constructor.
getQueryBuilder ( WellCommerce\Component\DataSet\Column\ColumnCollection $columns, WellCommerce\Component\DataSet\Request\DataSetRequestInterface $request ) : Doctrine\ORM\QueryBuilder Prepares and returns Doctrine's QueryBuilder

Private Methods

Method Description
addColumnConditionToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, WellCommerce\Component\DataSet\Column\ColumnInterface $column, WellCommerce\Component\DataSet\Conditions\ConditionInterface $condition ) Adds additional where/having clauses for given dataset's column
getConditions ( WellCommerce\Component\DataSet\Request\DataSetRequestInterface $request ) : WellCommerce\Component\DataSet\Conditions\ConditionsCollection Returns the query conditions
getOrderByExpression ( WellCommerce\Component\DataSet\Request\DataSetRequestInterface $request, WellCommerce\Component\DataSet\Column\ColumnCollection $columns ) : Doctrine\ORM\Query\Expr\OrderBy Prepares an ordering expression
setColumnConditions ( Doctrine\ORM\QueryBuilder $queryBuilder, WellCommerce\Component\DataSet\Column\ColumnCollection $columns ) Adds additional conditions to query

Method Details

__construct() public method

DataSetQueryBuilder constructor.
public __construct ( WellCommerce\Component\DataSet\Repository\DataSetAwareRepositoryInterface $repository )
$repository WellCommerce\Component\DataSet\Repository\DataSetAwareRepositoryInterface

getQueryBuilder() public method

Prepares and returns Doctrine's QueryBuilder
public getQueryBuilder ( WellCommerce\Component\DataSet\Column\ColumnCollection $columns, WellCommerce\Component\DataSet\Request\DataSetRequestInterface $request ) : Doctrine\ORM\QueryBuilder
$columns WellCommerce\Component\DataSet\Column\ColumnCollection
$request WellCommerce\Component\DataSet\Request\DataSetRequestInterface
return Doctrine\ORM\QueryBuilder