Source
$paging = CPagerHelper::paginate($this->getInput('page', 1), $prepared_data['items'], ZBX_SORT_UP, $view_url);
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2024 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* Controller for the "Latest data" page.
*/
class CControllerLatestView extends CControllerLatest {
protected function init(): void {
$this->disableSIDValidation();
}
protected function checkInput() {
$fields = [
// filter fields
'groupids' => 'array_db hosts_groups.groupid',
'hostids' => 'array_db hosts.hostid',
'name' => 'string',
'show_details' => 'in 1,0',
'evaltype' => 'in '.TAG_EVAL_TYPE_AND_OR.','.TAG_EVAL_TYPE_OR,
'tags' => 'array',
'show_tags' => 'in '.SHOW_TAGS_NONE.','.SHOW_TAGS_1.','.SHOW_TAGS_2.','.SHOW_TAGS_3,
'tag_name_format' => 'in '.TAG_NAME_FULL.','.TAG_NAME_SHORTENED.','.TAG_NAME_NONE,
'tag_priority' => 'string',
// table sorting inputs
'sort' => 'in host,name',
'sortorder' => 'in '.ZBX_SORT_UP.','.ZBX_SORT_DOWN,
'page' => 'ge 1',
// named filter properties
'filter_name' => 'string',
'filter_custom_time' => 'in 1,0',
'filter_show_counter' => 'in 1,0',
'filter_counters' => 'in 1',
'filter_set' => 'in 1',
'filter_reset' => 'in 1',
'counter_index' => 'ge 0',
'subfilter_hostids' => 'array',
'subfilter_tagnames' => 'array',
'subfilter_tags' => 'array',
'subfilter_data' => 'array',
'subfilters_expanded' => 'array'
];