Add usage of *_item_form hooks

This commit is contained in:
Johan Cwiklinski
2017-01-25 11:50:06 +01:00
committed by Johan Cwiklinski
parent a9224f7ca0
commit b270e19e91
2 changed files with 127 additions and 4 deletions

View File

@ -186,10 +186,13 @@ function plugin_init_example() {
// pre_show and post_show for tabs and items,
// see PluginExampleShowtabitem class for implementation explanations
$PLUGIN_HOOKS['pre_show_tab']['example'] = array( 'PluginExampleShowtabitem', 'pre_show_tab' );
$PLUGIN_HOOKS['post_show_tab']['example'] = array( 'PluginExampleShowtabitem', 'post_show_tab' );
$PLUGIN_HOOKS['pre_show_item']['example'] = array( 'PluginExampleShowtabitem', 'pre_show_item' );
$PLUGIN_HOOKS['post_show_item']['example'] = array( 'PluginExampleShowtabitem', 'post_show_item' );
$PLUGIN_HOOKS['pre_show_tab']['example'] = array('PluginExampleShowtabitem', 'pre_show_tab');
$PLUGIN_HOOKS['post_show_tab']['example'] = array('PluginExampleShowtabitem', 'post_show_tab');
$PLUGIN_HOOKS['pre_show_item']['example'] = array('PluginExampleShowtabitem', 'pre_show_item');
$PLUGIN_HOOKS['post_show_item']['example'] = array('PluginExampleShowtabitem', 'post_show_item');
$PLUGIN_HOOKS['pre_item_form']['example'] = ['PluginExampleItemForm', 'preItemForm'];
$PLUGIN_HOOKS['post_item_form']['example'] = ['PluginExampleItemForm', 'postItemForm'];
// declare this plugin as an import plugin for Computer itemtype
$PLUGIN_HOOKS['import_item']['exemple'] = array('Computer' => array('Plugin'));