Et dans le hook, une fonction :
function preItemUpdate(CommonDBTM $item) {
...
J’ai aussi trouvé une autre syntaxe dans un plugin. Dans le fichier setup :
$PLUGIN_HOOKS['pre_item_update']['geoentity']['Location'] = ['PluginGeoentityGeoentity','preItemUpdate'];
Et dans le fichier geoentity.class.php :
static function preItemUpdate(CommonDBTM $item) {
...
Mais il me semble que l’interception ne se produit dans aucun des deux cas. Ma fonction ne semble pas s’exécuter.
Quelqu’un pourrait-il m’aider ? Merci par avance.