You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
658 B
32 lines
658 B
<?php declare(strict_types = 0);
|
|
|
|
namespace Modules\Example_E;
|
|
|
|
use Zabbix\Core\CModule,
|
|
APP,
|
|
CMenu;
|
|
|
|
class Module extends CModule {
|
|
|
|
/**
|
|
* Initialize module.
|
|
*/
|
|
public function init(): void {
|
|
$menu = APP::Component()->get('menu.main');
|
|
|
|
$menu
|
|
->findOrAdd('Module 5 menu')
|
|
->setIcon('icon-integrations')
|
|
->getSubmenu()
|
|
->add(
|
|
(new \CMenuItem('пятый модуль'))->setAction('fifth.module')
|
|
);
|
|
|
|
$menu
|
|
->find('Module 5 menu')
|
|
->getSubmenu()
|
|
->insertBefore('', (new \CMenuItem('Your profile'))->setAction('userprofile.edit'))
|
|
->insertAfter('', (new \CMenuItem('Module list'))->setAction('module.list'));
|
|
}
|
|
}
|