示例#1
0
 /**
  * Retrieve the sortorder for the listheader based on the
  * ColumnConfig.
  *
  * @param ColumnConfig $columnConfig The config that contains options for
  *                                   extended sorting and grouping to a
  *                                   recordlist.
  *
  * @return string Returns sort order ASC or DESC
  */
 public function listHeaderSortOrder(ColumnConfig $columnConfig)
 {
     $order = $this->fieldName();
     // only add desc if not one of the listColumns is used for the sorting
     if (isset($columnConfig->m_colcfg[$order]) && empty($columnConfig->m_colcfg[$order]['extra'])) {
         $direction = $columnConfig->getDirection($order);
         if ($direction == 'asc') {
             $order .= ' desc';
         }
     }
     return $order;
 }
示例#2
0
 /**
  * Retrieve the sortorder for the listheader based on the
  * ColumnConfig.
  *
  * @param ColumnConfig $columnConfig The config that contains options for
  *                                   extended sorting and grouping to a
  *                                   recordlist.
  *
  * @return string Returns sort order ASC or DESC
  */
 public function listHeaderSortOrder(ColumnConfig $columnConfig)
 {
     $order = $this->fieldName();
     if (isset($columnConfig->m_colcfg[$order])) {
         $direction = $columnConfig->getDirection($order);
         if ($direction == 'asc') {
             $order .= ' desc';
         }
     }
     return $order;
 }