Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Module.php « module_number_1 « modules « selenium « tests « ui - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7f2db59f59fe3cd365c59e1c89b8de36ae030d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php declare(strict_types = 0);

namespace Modules\Example_A;

use Zabbix\Core\CModule,
	APP,
	CMenu;

class Module extends CModule {

	/**
	 * Initialize module.
	 */
	public function init(): void {
		$menu = APP::Component()->get('menu.main');

		$menu
			->find('Monitoring')
			->getSubMenu()
			->add(
				(new \CMenuItem('1st Module'))->setAction('first.module')
			);
	}
}