Source
$header_checkbox = (new CCheckBox('all_hosts'))->onClick("checkAll('".$form->getName()."', 'all_hosts', 'hostids');");
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2023 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.
**/
/**
* @var CView $this
* @var array $data
*/
$this->addJsFile('class.tagfilteritem.js');
$this->addJsFile('items.js');
$this->addJsFile('multilineinput.js');
$this->includeJsFile('configuration.host.list.js.php');
if ($data['uncheck']) {
uncheckTableRows('hosts');
}
$html_page = (new CHtmlPage())
->setTitle(_('Hosts'))
->setDocUrl(CDocHelper::getUrl(CDocHelper::DATA_COLLECTION_HOST_LIST))
->setControls((new CTag('nav', true, (new CList())
->addItem(
(new CSimpleButton(_('Create host')))
->onClick('view.createHost()')
)
->addItem(
(new CButton('form', _('Import')))
->onClick(
'return PopUp("popup.import", {
rules_preset: "host", '.
CCsrfTokenHelper::CSRF_TOKEN_NAME.': "'. CCsrfTokenHelper::get('import').
'"}, {
dialogueid: "popup_import",
dialogue_class: "modal-popup-generic"
});'
)
->removeId()
)
))->setAttribute('aria-label', _('Content controls'))
);
$action_url = (new CUrl('zabbix.php'))->setArgument('action', $data['action']);
$filter = (new CFilter())
->setResetUrl($action_url)