fase 1 - elaborazione qwen
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
define('PLUGIN_NETCONFIG_VERSION', '1.0.0');
|
||||
define('PLUGIN_NETCONFIG_NAME', 'netconfig');
|
||||
|
||||
function plugin_init_netconfig() {
|
||||
global $PLUGIN_HOOKS;
|
||||
|
||||
$PLUGIN_HOOKS['csrf_compliant']['netconfig'] = true;
|
||||
$PLUGIN_HOOKS['compatible']['netconfig'] = ['glpi' => '>=11.0'];
|
||||
|
||||
// Integrazione menu GLPI
|
||||
$PLUGIN_HOOKS['menu_toadd']['netconfig'] = [
|
||||
'tools' => \PluginNetconfig\Config::class,
|
||||
];
|
||||
|
||||
// Registrazione endpoint API per l'agent
|
||||
$PLUGIN_HOOKS['add_api_endpoint']['netconfig'] = [
|
||||
'/plugin/netconfig/agent' => 'PluginNetconfig\Agent\Receive',
|
||||
];
|
||||
|
||||
// Attivazione massive actions
|
||||
$PLUGIN_HOOKS['use_massive_actions']['netconfig'] = true;
|
||||
|
||||
// Registrazione automatica dei diritti profilo
|
||||
if (class_exists('\PluginNetconfig\Config')) {
|
||||
$PLUGIN_HOOKS['add_javascript']['netconfig'][] = 'netconfig.js'; // Opzionale
|
||||
}
|
||||
}
|
||||
|
||||
function plugin_version_netconfig() {
|
||||
return [
|
||||
'name' => 'Network Config Backup',
|
||||
'version' => PLUGIN_NETCONFIG_VERSION,
|
||||
'author' => 'Your Name / Team',
|
||||
'license' => 'GPL-3.0-or-later',
|
||||
'homepage' => '',
|
||||
'requirements' => [
|
||||
'glpi' => ['min' => '11.0.0', 'max' => '11.99.99'],
|
||||
'php' => ['min' => '8.2.0'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
function plugin_install_netconfig() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function plugin_uninstall_netconfig() {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user