mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 06:58:43 +02:00
Add tags and display for plugins on GLPI External links & minor fixes
This commit is contained in:
11
setup.php
11
setup.php
@ -51,15 +51,20 @@ function plugin_init_example() {
|
||||
'Preference', 'Profile', 'Supplier');
|
||||
Plugin::registerClass('PluginExampleExample',
|
||||
array('notificationtemplates_types' => true,
|
||||
'addtabon' => $types));
|
||||
'addtabon' => $types,
|
||||
'link_types' => true));
|
||||
|
||||
Plugin::registerClass('PluginExampleRuleTestCollection',
|
||||
array('rulecollections_types' => true));
|
||||
|
||||
Plugin::registerClass('PluginExampleDeviceCamera',
|
||||
array('device_types' => true));
|
||||
|
||||
|
||||
if (class_exists('PluginExampleExample')) {
|
||||
Link::registerTag(PluginExampleExample::$tags);
|
||||
}
|
||||
// Display a menu entry ?
|
||||
$_SESSION["glpi_plugin_example_profile"]['example'] = 'w';
|
||||
if (isset($_SESSION["glpi_plugin_example_profile"])) { // Right set in change_profile hook
|
||||
$PLUGIN_HOOKS['menu_toadd']['example'] = array('plugins' => 'PluginExampleExample',
|
||||
'tools' => 'PluginExampleExample');
|
||||
@ -79,7 +84,7 @@ function plugin_init_example() {
|
||||
}
|
||||
|
||||
// Config page
|
||||
if (Session::haveRight('config','w')) {
|
||||
if (Session::haveRight('config',UPDATE)) {
|
||||
$PLUGIN_HOOKS['config_page']['example'] = 'config.php';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user