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
Constants¶
                
SORT_ASC        ¶
    
        
        AbstractSortClause.php
                :
        16
                
    
        | 
                     | 
                
                    
                     | 
            
                
SORT_DESC        ¶
    
        
        AbstractSortClause.php
                :
        19
                
    
        | 
                     | 
                
                    
                     | 
            
Properties¶
                
        $sortDirection
            ¶
    
        
        AbstractSortClause.php
                :
        34
                
    
        | 
                     | 
                
                    
                     | 
            
Methods¶
                
__construct()
            ¶
    
        
        Id.php
                :
        31
                
    
        Constructs a new SortClause on $sortTarget in direction $sortDirection.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $sortDirection | string | Id::SORT_ASC | 
                                                         one of SortDirection::ASC or SortDirection::DESC  | 
                
                
getDirection()
            ¶
    
        
        AbstractSortClause.php
                :
        39
                
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
getField()
            ¶
    
        
        FieldValueSortClause.php
                :
        22
                
    
        | 
                     | 
                
                    
                     | 
            
Return values
string
                
setDirection()
            ¶
    
        
        AbstractSortClause.php
                :
        47
                
    
        | 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $direction | string | - | - |