@@ -260,8 +260,11 @@ function plugin_init_example() {
260260 $ PLUGIN_HOOKS [Hooks::PRE_ITEM_FORM ]['example ' ] = [ItemForm::class, 'preItemForm ' ];
261261 $ PLUGIN_HOOKS [Hooks::POST_ITEM_FORM ]['example ' ] = [ItemForm::class, 'postItemForm ' ];
262262
263- $ PLUGIN_HOOKS [Hooks::PRE_ITIL_INFO_SECTION ]['example ' ] = [ItemForm::class, 'preSection ' ];
264- $ PLUGIN_HOOKS [Hooks::POST_ITIL_INFO_SECTION ]['example ' ] = [ItemForm::class, 'postSection ' ];
263+ //TODO: remove check when GLPI 11.0.0 is released
264+ if (version_compare (GLPI_VERSION , '11.0.0 ' , 'ge ' )) {
265+ $ PLUGIN_HOOKS [Hooks::PRE_ITIL_INFO_SECTION ]['example ' ] = [ItemForm::class, 'preSection ' ];
266+ $ PLUGIN_HOOKS [Hooks::POST_ITIL_INFO_SECTION ]['example ' ] = [ItemForm::class, 'postSection ' ];
267+ }
265268
266269 // Add new actions to timeline
267270 $ PLUGIN_HOOKS [Hooks::TIMELINE_ACTIONS ]['example ' ] = [
@@ -287,8 +290,11 @@ function plugin_init_example() {
287290 ComputerModelFilter::class
288291 ];
289292
290- // Icon in the impact analysis
291- $ PLUGIN_HOOKS [Hooks::SET_ITEM_IMPACT_ICON ]['example ' ] = 'plugin_example_set_impact_icon ' ;
293+ //TODO: remove check when GLPI 11.0.0 is released
294+ if (version_compare (GLPI_VERSION , '11.0.0 ' , 'ge ' )) {
295+ // Icon in the impact analysis
296+ $ PLUGIN_HOOKS [Hooks::SET_ITEM_IMPACT_ICON ]['example ' ] = 'plugin_example_set_impact_icon ' ;
297+ }
292298}
293299
294300
0 commit comments