code: protected function extractSorting($config)
      {
          $sorting = $config->getSorting();
  
          $sortBy  = key($sorting);
          $sortDir = current($sorting) ?: DCGE::MODEL_SORTING_ASC;
  
          return array($sortBy, $sortDir);
      }
docs: Extract the sorting from the given config.
  
  @param ConfigInterface $config The configuration to be applied.
  
  @return array