Exemplo n.º 1
0
 /**
  * @param \Spryker\Zed\Gui\Communication\Table\TableConfiguration $config
  *
  * @return array
  */
 public function getOrders(TableConfiguration $config)
 {
     $defaultSorting = [[self::SORT_BY_COLUMN => $config->getDefaultSortColumnIndex(), self::SORT_BY_DIRECTION => $config->getDefaultSortDirection()]];
     $orderParameter = $this->request->query->get('order');
     if (!is_array($orderParameter)) {
         return $defaultSorting;
     }
     $sorting = $this->createSortingParameters($orderParameter);
     if (empty($sorting)) {
         return $defaultSorting;
     }
     return $sorting;
 }