function embed()
 {
     $settings_file = ZMG_ABS_PATH . DS . 'var' . DS . 'plugins' . DS . 'toolbox' . DS . 'settings.xml';
     if (file_exists($settings_file)) {
         $plugins =& zmgFactory::getPlugins();
         $plugin =& $plugins->get('toolbox');
         $plugins->embedSettings(&$plugin, $settings_file);
     }
 }
 /**
  * Launch all components that are bound to a specific custom event handler.
  *
  * @param string The name of the event that is fired
  * @param bool The event may or may not bubble down
  * @return mixed
  */
 function fire($type, $nobubble = false)
 {
     $event = new zmgEvent($type);
     $args = func_get_args();
     $newArgs = array_splice($args, 2, count($args));
     if (count($newArgs) == 1) {
         $newArgs = $newArgs[0];
     }
     $event->pass($newArgs);
     //bubble through to plugins:
     if (!(bool) $nobubble) {
         $plugins =& zmgFactory::getPlugins();
         return $plugins->bubbleEvent($event);
     }
 }
 function getPluginsHTML()
 {
     return zmgFactory::getPlugins()->embedHTML();
 }