$this->includeJsFile('administration.iconmap.edit.js.php');
$html_page = (new CHtmlPage())
->setTitle(_('Icon mapping'))
->setTitleSubmenu(getAdministrationGeneralSubmenu())
->setDocUrl(CDocHelper::getUrl(CDocHelper::ADMINISTRATION_ICONMAP_EDIT));
$form_list = new CFormList();
$name = (new CTextBox('iconmap[name]', $data['iconmap']['name']))
->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)
->setAttribute('maxlength', 64)
->setAttribute('autofocus', 'autofocus');
$form_list->addRow((new CLabel(_('Name'), 'iconmap[name]'))->setAsteriskMark(), $name);
$csrf_token = CCsrfTokenHelper::get('iconmap');
->addItem((new CVar(CSRF_TOKEN_NAME, $csrf_token))->removeId())
->setAction((new CUrl('zabbix.php'))
->setArgument('action', ($data['iconmapid'] != 0) ? 'iconmap.update' : 'iconmap.create')
->setAttribute('aria-labelledby', CHtmlPage::PAGE_TITLE_ID)
if ($data['iconmapid'] != 0) {
$form->addVar('iconmapid', $data['iconmapid']);
->setAttribute('style', 'width: 100%;')
->addClass(ZBX_STYLE_LIST_NUMBERED)
->setHeader(['', '', _('Inventory field'), _('Expression'), _('Icon'), '', _('Action')]);
foreach ($data['iconmap']['mappings'] as $mapping) {