Sort clause for sorting payment methods by enabled status.
The following example split all payment methods in two groups, the enabled and the disabled:
$query = new PaymentMethodQuery();
$query->addSortClause(new Enabled());
$paymentMethods = $paymentMethodService->findPaymentMethods($query);
Tags
Constants¶
SORT_ASC ¶
AbstractSortClause.php
:
16
|
|
SORT_DESC ¶
AbstractSortClause.php
:
19
|
|
Methods¶
__construct() ¶
Enabled.php
:
30
Constructs a new SortClause on $sortTarget in direction $sortDirection.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$sortDirection | string | Enabled::SORT_ASC |
one of SortDirection::ASC or SortDirection::DESC |
getDirection() ¶
AbstractSortClause.php
:
39
|
|
Return values
string
getField() ¶
FieldValueSortClause.php
:
24
|
|
Return values
string
setDirection() ¶
AbstractSortClause.php
:
47
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$direction | string | - | - |