Source
$actionOperationDescriptions = getActionOperationDescriptions($data['eventsource'], [$data['action']], ACTION_OPERATION);
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 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
*/
require_once dirname(__FILE__).'/js/configuration.action.edit.js.php';
$widget = (new CWidget())->setTitle(_('Actions'));
// create form
$actionForm = (new CForm())
->setId('action-form')
->setName('action.edit')
->setAction((new CUrl('actionconf.php'))
->setArgument('eventsource', $data['eventsource'])
->getUrl()
)
->setAttribute('aria-labeledby', ZBX_STYLE_PAGE_TITLE)
->addVar('form', $data['form']);
if ($data['actionid']) {
$actionForm->addVar('actionid', $data['actionid']);
}
// Action tab.
$action_tab = (new CFormList())
->addRow(
(new CLabel(_('Name'), 'name'))->setAsteriskMark(),
(new CTextBox('name', $data['action']['name']))
->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)
->setAriaRequired()
->setAttribute('autofocus', 'autofocus')
);
// Create condition table.
$condition_table = (new CTable(_('No conditions defined.')))
->setId('conditionTable')
->setAttribute('style', 'width: 100%;')
->setHeader([_('Label'), _('Name'), _('Action')]);
$i = 0;
if ($data['action']['filter']['conditions']) {