class QueryFactory (View source)

Class QueryFactory

Responsible for creating Concrete\Core\Entity\Search\Query objects from different sources, which can then be persisted, or turned into active result objects.

Methods

array
getRequestData($request, $method)

No description

createQuery(ProviderInterface $searchProvider, $fields = [])

Creates the default query object for a particular search provider. Pre-loaded search fields can be added to filter the query.

createFromAdvancedSearchRequest(ProviderInterface $searchProvider, Request $request, string $method = Request::METHOD_POST)

Creates a Query object from the request of the standard Advanced Search dialog. This is the dialog that includes the stackable filters, customizable columns, items per page, etc.

mixed
createFromSavedSearch(SavedSearch $preset)

Creates a query object from a saved search. You could easily just call getQuery on the preset directly; this is mainly here for code purity.

Details

private array getRequestData($request, $method)

No description

Parameters

$request
$method

Return Value

array

Query createQuery(ProviderInterface $searchProvider, $fields = [])

Creates the default query object for a particular search provider. Pre-loaded search fields can be added to filter the query.

Parameters

ProviderInterface $searchProvider
$fields

Return Value

Query

Query createFromAdvancedSearchRequest(ProviderInterface $searchProvider, Request $request, string $method = Request::METHOD_POST)

Creates a Query object from the request of the standard Advanced Search dialog. This is the dialog that includes the stackable filters, customizable columns, items per page, etc.

..

Parameters

ProviderInterface $searchProvider
Request $request
string $method

Return Value

Query

mixed createFromSavedSearch(SavedSearch $preset)

Creates a query object from a saved search. You could easily just call getQuery on the preset directly; this is mainly here for code purity.

Parameters

SavedSearch $preset

Return Value

mixed