Lines Matching refs:rows
170 $rows = [];
190 $rows[] = [
204 return $rows;
210 * @param array $rows
215 public function sortRows(array $rows, $sort, $dir) argument
219 usort($rows, function ($a, $b) use ($field) {
227 $rows = array_reverse($rows);
229 return $rows;
334 $rows = $this->buildRows($users, $toggles);
336 $rows = array_values(array_filter($rows, static function ($r) use ($setFilter) {
340 $rows = $this->applyFilters($rows, $qfilters, $filterMap);
341 $rows = $this->sortRows($rows, $sort, $dir);
342 $total = count($rows);
344 [$pageRows, $page, $totalPages, $from, $to] = $this->paginate($rows, $perPage);
494 * @param array $rows
499 protected function applyFilters(array $rows, array $qfilters, array $map) argument
502 return $rows;
504 return array_values(array_filter($rows, function ($row) use ($qfilters, $map) {
540 * @param array $rows filtered + sorted rows
545 protected function paginate(array $rows, $perPage) argument
548 $total = count($rows);
551 return [$rows, 1, 1, $total > 0 ? 1 : 0, $total];
564 $slice = array_slice($rows, $offset, $perPage);