Example for eZWorkflowType::STATUS_REDIRECT

Author Message

Eirik Alfstad Johansen

Tuesday 22 February 2011 5:36:31 am

We're looking to create a workflow event type which returns the constant eZWorkflowType::STATUS_REDIRECT. However, I'm curious as to where/how we should specify the URL to which one should be redirected. Can anyone please give me an example or refer me to some documentation?

Thanks in advance!

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Olav Frengstad

Thursday 24 February 2011 7:01:44 am

$The eZTrigger::runWorkflow(); does actions based on workflow return value.

You would need to set the RedirectUrl property of the eZWorkflowProcess.

something like this i guess:

public function execute( $process, $event ) {
   $process->RedirectUrl = 'http://ez.no';

   return eZWorkflowType::STATUS_REDIRECT;
 }

Eirik Alfstad Johansen

Thursday 24 February 2011 9:50:06 am

Thanks for the tip, Olav. It worked like a charm. :)

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.