setNoDataMessage(_('No maps added.')); foreach ($data['maps'] as $map) { $table->addRow([ $data['allowed_ui_maps'] ? new CLink($map['label'], (new CUrl('zabbix.php')) ->setArgument('action', 'map.view') ->setArgument('sysmapid', $map['sysmapid']) ) : $map['label'], (new CButton()) ->onClick("rm4favorites('sysmapid','".$map['sysmapid']."')") ->addClass(ZBX_STYLE_BTN_REMOVE) ->setAttribute('aria-label', _xs('Remove, %1$s', 'screen reader', $map['label'])) ->removeId() ]); } $output = [ 'name' => $data['name'], 'body' => $table->toString() ]; if (($messages = getMessages()) !== null) { $output['messages'] = $messages->toString(); } if ($data['user']['debug_mode'] == GROUP_DEBUG_MODE_ENABLED) { CProfiler::getInstance()->stop(); $output['debug'] = CProfiler::getInstance()->make()->toString(); } echo json_encode($output);