Lines Matching refs:sort
165 $sort = $INPUT->str('sort', 'page');
166 if (!in_array($sort, $this->sortable, true)) {
167 $sort = 'page';
173 $shown = $this->sortRows($shown, $sort, $dir);
211 echo '<input type="hidden" name="sort" value="' . hsc($sort) . '" />';
219 echo $this->headerCell($c, $labels[$c], $sort, $dir);
222 echo $this->renderFilterRow($cols, $filters, $sort, $dir);
393 * @param string $sort one of $this->sortable
397 protected function sortRows(array $rows, $sort, $dir) argument
399 usort($rows, static function ($a, $b) use ($sort) {
400 if ($sort === 'normal' || $sort === 'resolved' || $sort === 'orphaned') {
401 $cmp = $a[$sort] <=> $b[$sort];
469 $sort = $INPUT->str('sort');
470 if (in_array($sort, $this->sortable, true)) {
471 $params['sort'] = $sort;
506 * @param string $sort currently active sort column
510 protected function headerCell($key, $label, $sort, $dir) argument
516 $newDir = ($sort === $key && $dir === 'asc') ? 'desc' : 'asc';
518 if ($sort === $key) {
537 * @param string $sort
541 protected function renderFilterRow(array $cols, array $filters, $sort, $dir) argument
556 'sort' => $sort,
717 $sort = $INPUT->str('sort');
718 if (in_array($sort, $this->sortable, true)) {
719 $html .= '<input type="hidden" name="sort" value="' . hsc($sort) . '" />';