Copied!

Id

Id.php : 29
Implements SortClauseInterface

Sort clause for sorting payment methods by ID.

The following example sorts payment by ascending IDs, from lower to greater:

$query = new PaymentMethodQuery();
$query->addSortClause(new Id());

$paymentMethods = $paymentMethodService->findPaymentMethods($query);

Typically used to ensure that the payment methods order is always the same.

Tags
See
PaymentMethodServiceInterface::findPaymentMethods()

Constants

publicSORT_ASC

AbstractSortClause.php : 16
public mixed SORT_ASC = \Ibexa\Contracts\ProductCatalog\Values\Common\Query\SortDirection::ASC

publicSORT_DESC

AbstractSortClause.php : 19
public mixed SORT_DESC = \Ibexa\Contracts\ProductCatalog\Values\Common\Query\SortDirection::DESC

Methods

public__construct()

Id.php : 31

Constructs a new SortClause on $sortTarget in direction $sortDirection.

public __construct([string $sortDirection = self::SORT_ASC ])

Parameters

Name Type Default value Description
$sortDirection string Id::SORT_ASC

one of SortDirection::ASC or SortDirection::DESC

publicgetDirection()

AbstractSortClause.php : 39
public final getDirection() : string

Return values

string

publicgetField()

FieldValueSortClause.php : 24
public getField() : string

Return values

string

publicsetDirection()

AbstractSortClause.php : 47
public final setDirection(string $direction) : void

Parameters

Name Type Default value Description
$direction string - -
Tags
Throws
InvalidArgumentException

if the given sort direction is invalid