Source
<?php
/*
** Zabbix
** Copyright (C) 2001-2025 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
*/
$shape_border_types = [
SYSMAP_SHAPE_BORDER_TYPE_NONE => _('None'),
SYSMAP_SHAPE_BORDER_TYPE_SOLID => '———',
SYSMAP_SHAPE_BORDER_TYPE_DOTTED => '· · · ·',
SYSMAP_SHAPE_BORDER_TYPE_DASHED => '- - - -'
];
$horizontal_align_types = [
SYSMAP_SHAPE_LABEL_HALIGN_LEFT => _('Left'),
SYSMAP_SHAPE_LABEL_HALIGN_CENTER => _('Center'),
SYSMAP_SHAPE_LABEL_HALIGN_RIGHT => _('Right')
];
$vertical_align_types = [
SYSMAP_SHAPE_LABEL_VALIGN_TOP => _('Top'),
SYSMAP_SHAPE_LABEL_VALIGN_MIDDLE => _('Middle'),
SYSMAP_SHAPE_LABEL_VALIGN_BOTTOM => _('Bottom')
];
/**
* Get font select element.
*
* @param string $name
*
* @return CSelect
*/
function createFontSelect(string $name): CSelect {
return (new CSelect($name))
->setId($name)
->addOptionGroup((new CSelectOptionGroup(_('Serif')))->addOptions(CSelect::createOptionsFromArray([
0 => 'Georgia',
1 => 'Palatino',
2 => 'Times New Roman'
])))
->addOptionGroup((new CSelectOptionGroup(_('Sans-Serif')))->addOptions(CSelect::createOptionsFromArray([
3 => 'Arial',
4 => 'Arial Black',
5 => 'Comic Sans',