Forums / Developer / Example for eZWorkflowType::STATUS_REDIRECT
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; }
Thursday 24 February 2011 9:50:06 am
Thanks for the tip, Olav. It worked like a charm. :)