From: hickert Date: Wed, 3 Mar 2010 08:37:49 +0000 (+0000) Subject: unified post event handling! X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a837ef6d9a5177b2371e9907bcaca886497f1a91;p=gosa.git unified post event handling! git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15868 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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: