Lines Matching refs:sort
107 $sort = $INPUT->str('sort', 'lastseen');
108 if (!in_array($sort, $this->sortable, true)) {
109 $sort = 'lastseen';
112 if (($sort === 'mail' && !$showMail) || ($sort === 'grps' && !$showGrps)) {
113 $sort = 'lastseen';
144 $rows = $this->sortRows($rows, $sort, $order);
167 echo '<input type="hidden" name="sort" value="' . hsc($sort) . '" />';
176 echo $this->headerCell($c, $labels[$c], $sort, $order, $filters, $ID);
179 echo $this->renderFilterRow($cols, $filterCols, $filters, $sort, $order, $ID);
207 echo $this->renderPager($page, $totalPages, $sort, $order, $filters, $ID);
289 * @param string $sort column key
293 protected function sortRows(array $rows, $sort, $order) argument
295 usort($rows, static function ($a, $b) use ($sort) {
296 if ($sort === 'lastseen') {
299 return strcasecmp((string) ($a[$sort] ?? ''), (string) ($b[$sort] ?? ''));
369 * @param string $sort currently active sort column
375 protected function headerCell($key, $label, $sort, $order, array $filters, $id) argument
379 $newOrder = ($sort === $key && $order === 'asc') ? 'desc' : 'asc';
382 if ($sort === $key) {
406 * @param string $sort
411 …protected function renderFilterRow(array $cols, array $filterCols, array $filters, $sort, $order, … argument
425 $clear = wl($id, $this->linkParams(['sort' => $sort, 'order' => $order], []));
441 * @param string $sort
447 protected function renderPager($page, $totalPages, $sort, $order, array $filters, $id) argument
456 … $html .= $this->pagerLink($id, $page - 1, $sort, $order, $filters, '‹', 'pager_prev');
467 $html .= $this->pagerLink($id, $p, $sort, $order, $filters, (string) $p, '');
472 … $html .= $this->pagerLink($id, $page + 1, $sort, $order, $filters, '›', 'pager_next');
485 * @param string $sort
492 protected function pagerLink($id, $p, $sort, $order, array $filters, $text, $titleKey) argument
494 … $url = wl($id, $this->linkParams(['sort' => $sort, 'order' => $order, 'pg' => $p], $filters));