mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
[example] use registerPluginType
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@64 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
parent
cfbbc6eb99
commit
520e60a5d6
@ -43,7 +43,6 @@ if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){
|
|||||||
} else {
|
} else {
|
||||||
helpHeader("TITRE", $_SERVER['PHP_SELF']);
|
helpHeader("TITRE", $_SERVER['PHP_SELF']);
|
||||||
}
|
}
|
||||||
$_GET['target']=$_SERVER['PHP_SELF'];
|
|
||||||
|
|
||||||
checkTypeRight(PLUGIN_EXAMPLE_TYPE,"r");
|
checkTypeRight(PLUGIN_EXAMPLE_TYPE,"r");
|
||||||
|
|
||||||
|
12
setup.php
12
setup.php
@ -108,7 +108,17 @@ function plugin_init_example() {
|
|||||||
$PLUGIN_HOOKS['stats']['example'] = array('stat.php'=>'New stat', 'stat.php?other'=>'New stats 2',);
|
$PLUGIN_HOOKS['stats']['example'] = array('stat.php'=>'New stat', 'stat.php?other'=>'New stats 2',);
|
||||||
|
|
||||||
// Params : plugin name - string type - ID - class - table - form page - Type name
|
// Params : plugin name - string type - ID - class - table - form page - Type name
|
||||||
pluginNewType('example',"PLUGIN_EXAMPLE_TYPE",1001,"pluginExample","glpi_plugin_example","example.form.php","Example Type");
|
registerPluginType('example', 'PLUGIN_EXAMPLE_TYPE', 1001, array(
|
||||||
|
'classname' => 'pluginExample',
|
||||||
|
'tablename' => 'glpi_plugin_example',
|
||||||
|
'formpage' => 'example.form.php',
|
||||||
|
'searchpage' => 'index.php',
|
||||||
|
'typename' => 'Example Type',
|
||||||
|
'deleted_tables' => false,
|
||||||
|
'template_tables' => false,
|
||||||
|
'specif_entities_tables' => false,
|
||||||
|
'recursive_type' => false
|
||||||
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user