Example #1
0
 /**
  * Forwards the current execution to another module/view with the existing
  * parameters.
  * 
  * @param eZModule $module The eZModule object the request will be forwarded to
  * @param string $functionName The function to run in that module
  * @param array $parameters
  *        An array of parameters that will be added to the request. These
  *        will be merged with the existing parameters
  * @return array The forwarded module/view result
  */
 function forward($module, $functionName, $parameters = false)
 {
     $Return = null;
     if ($module && $functionName) {
         $viewName = eZModule::currentView();
         if ($parameters === false) {
             $parameters = array();
         }
         $parameters = array_merge($parameters, $this->OriginalViewParameters);
         $unorderedParameters = $this->OriginalUnorderedParameters;
         $userParameters = $this->UserParameters;
         $Return = $module->run($functionName, $parameters, $unorderedParameters, $userParameters);
         // override default navigation part
         if ($Return['is_default_navigation_part'] === true) {
             if ($this->singleFunction()) {
                 $function = $this->Module["function"];
             } else {
                 $function = $this->Functions[$functionName];
             }
             if (isset($function['default_navigation_part'])) {
                 $Return['navigation_part'] = $function['default_navigation_part'];
             }
         }
         $this->RedirectURI = $module->redirectURI();
         $this->setExitStatus($module->exitStatus());
     }
     return $Return;
 }