Example #1
0
 /**
  * Get the column configuration object.
  *
  * @param string $id optional column config id
  * @param bool $forceNew force new instance?
  *
  * @return ColumnConfig
  */
 public function getColumnConfig($id = null, $forceNew = false)
 {
     $columnConfig = ColumnConfig::getConfig($this, $id, $forceNew);
     return $columnConfig;
 }
Example #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();
     // 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;
 }
Example #3
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;
 }