Custom associated items

Aurélien 7 years ago updated 4 years ago 3


I need to customize "Associated Items" for 2 plugins because I want to link databases to one of my web application (I have the 2 plugins installed : Databases and WebApplication).

I don't see a functionnality to do that without modifying myself .class.php file.

If you can add a new way more easly to do that without to forget compatibility with update of plugins...

Thanks in advance



For the moment I do this in the aim to have my new associated item :

=> Open file /var/www/glpi/plugins/databases/inc/database.class.php
=> See the line :
class PluginDatabasesDatabase extends CommonDBTM {

=> Copy class name : PluginDatabasesDatabase

=> Open file /var/www/glpi/plugins/webapplications/inc/webapplication.class.php
=> See the line :
static $types = array('Computer', 'Monitor', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer', 'Software', 'Entity');
=> Paste to the end of the list the class name :
static $types = array('Computer', 'Monitor', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer', 'Software', 'Entity'[u][b],'PluginDatabasesDatabase'[/b][/u]);


I agree that we sometimes find ourselves willing to link together 2 plugin or core itemtypes where such link was not anticipated by core/plugin's developer.

+1 on that one.

I need this new improvment because I want to update GLPI core and when I do it, GLPI won't start anymore.

Please, can you add this new fonctionnality ?

Thanks for your help