class FrontendQueryScope implements QueryScopeInterface (View source)

This class takes an overall config array as input and parses into values applicable for performing select queries.

This takes into account default ordering for ContentTypes.

Properties

protected Config $config
protected array $orderBys

Methods

__construct(Config $config, LocaleHelper $localeHelper, Environment $twig, Notifications $notifications)

Constructor.

string
getOrder(QueryInterface $query)

Get the default order setting for a given content type.

void
parseContentTypes()

Iterates over the main config and sets up what the default ordering should be.

onQueryExecute(QueryInterface $query)

No description

Details

__construct(Config $config, LocaleHelper $localeHelper, Environment $twig, Notifications $notifications)

Constructor.

Parameters

Config $config
LocaleHelper $localeHelper
Environment $twig
Notifications $notifications

string getOrder(QueryInterface $query)

Get the default order setting for a given content type.

Parameters

QueryInterface $query

Return Value

string

protected void parseContentTypes()

Iterates over the main config and sets up what the default ordering should be.

Return Value

void

onQueryExecute(QueryInterface $query)

Parameters

QueryInterface $query