public function getSortOrders(ContainerConfigurationInterface $containerConfiguration, SearchCriteriaInterface $searchCriteria)
    {
        $sortOrders = [];

        foreach ($searchCriteria->getSortOrders() ?? [] as $sortOrder) {
            $sortOrders[$sortOrder->getField()] = ['direction' => $sortOrder->getDirection()];
        }

        return $sortOrders;
    }
public function getSortOrders(ContainerConfigurationInterface $containerConfiguration, SearchCriteriaInterface $searchCriteria)
    {
        $sortOrders = [];

        foreach ($searchCriteria->getSortOrders() ?? [] as $sortOrder) {
            $sortOrders[$sortOrder->getField()] = ['direction' => $sortOrder->getDirection()];
        }

        return $sortOrders;
    }
public function getSortOrders ( ContainerConfigurationInterface $ containerConfiguration , SearchCriteriaInterface $ searchCriteria ) { $ sortOrders = [ ] ; foreach ( $ searchCriteria -> getSortOrders ( ) ?? [ ] as $ sortOrder ) { $ sortOrders [ $ sortOrder -> getField ( ) ] = [ 'direction' => $ sortOrder -> getDirection ( ) ] ; } return $ sortOrders ; }
Extract sort orders from the search criteria.

@SuppressWarnings(PHPMD.UnusedFormalParameter)

@param ContainerConfigurationInterface $containerConfiguration Container config.
@param SearchCriteriaInterface         $searchCriteria         Search criteria.

@return array
Extract sort orders from the search criteria .