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; }
/** * Вариант сортировки по имени колонки * * @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); }