예제 #1
0
 /**
  * Change default behavior of the search result block.
  * Order has to be set to ASC and not DESC.
  *
  * @param \Magento\CatalogSearch\Block\Result $resultBlock Result block.
  * @param \Closure                            $proceed     Original method.
  *
  * @return \Magento\CatalogSearch\Block\Result
  */
 public function aroundSetListOrders(Result $resultBlock, \Closure $proceed)
 {
     $proceed();
     $resultBlock->getListBlock()->setDefaultDirection('asc');
     return $resultBlock;
 }