From a837ef6d9a5177b2371e9907bcaca886497f1a91 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 3 Mar 2010 08:37:49 +0000 Subject: [PATCH] unified post event handling! git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15868 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_management.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 2769a5745..8f9827a2f 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -914,6 +914,31 @@ class management { return(is_object($this->tabObject) || is_object($this->dialogObject)); } + + + /*! \brief Forward command execution request + * to the correct method. + */ + function handle_post_events($mode, $addAttrs= array()) + { + if(!in_array($mode, array('add','remove','modify'))){ + trigger_error(sprintf("Invalid post event type given '%s'! Valid types are [add,modify,remove].", $mode)); + return; + } + switch ($mode){ + case "add": + plugin::callHook($this,"POSTCREATE", $addAttrs); + break; + + case "modify": + plugin::callHook($this,"POSTMODIFY", $addAttrs); + break; + + case "remove": + plugin::callHook($this,"POSTREMOVE", $addAttrs); + break; + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -- 2.30.2