Example #1
0
 function __construct(Navigator $navigator, $column, $name = null, $validator = null, $callable = null)
 {
     if (!is_null($callable) && !is_callable($callable)) {
         Exception::ThrowError(Exception::FILTER_NOT_CALLABLE);
     }
     $this->navigator = $navigator;
     $this->column = $column;
     $this->name = $name;
     $this->callable = $callable;
     $this->validator = $validator;
 }
Example #2
0
 /**
  * Вариант сортировки по имени колонки
  *
  * @return OrderBy
  */
 public function getOrderByOption($column)
 {
     $opt = $this->getOrderByOptions();
     list($col, $asc) = $this->processOrderColumnFromUrl($column);
     if (!$this->checkOrderByOptionExists($col)) {
         Exception::ThrowError(Exception::NO_ORDERBY_OPTION, $col);
     }
     $o = $opt[$col];
     return $o->setAsc($asc);
 }