class OrderDirective (View source)

Directive to alter query based on 'order' parameter.

eg: 'pages', ['order'=>'-publishedAt']

Constants

NAME

Methods

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

No description

void
__invoke(QueryInterface $query, string $order)

No description

array
getOrderBys(string $order)

No description

bool
isMultiOrderQuery(string $order)

No description

bool
isActualField(QueryInterface $query, string $name)

No description

Details

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

Parameters

LocaleHelper $localeHelper
Environment $twig
Notifications $notifications

void __invoke(QueryInterface $query, string $order)

Parameters

QueryInterface $query
string $order

Return Value

void

protected array getOrderBys(string $order)

Parameters

string $order

Return Value

array

protected bool isMultiOrderQuery(string $order)

Parameters

string $order

Return Value

bool

protected bool isActualField(QueryInterface $query, string $name)

Parameters

QueryInterface $query
string $name

Return Value

bool