raoul2000\workflow\events\WorkflowEvent::beforeLeaveWorkflow PHP Method

beforeLeaveWorkflow() public static method

Create name for a *before leave workflow* event.
public static beforeLeaveWorkflow ( string $workflowId = self::ANY_WORKFLOW ) : string
$workflowId string the workflow id or any workflow id if not set
return string name of the event
    public static function beforeLeaveWorkflow($workflowId = self::ANY_WORKFLOW)
    {
        self::_checkNonEmptyString('workflowId', $workflowId);
        return 'beforeLeaveWorkflow{' . $workflowId . '}';
    }

Usage Example

 public function events()
 {
     return [WorkflowEvent::beforeEnterStatus('Item06Workflow/new') => "beforeNew", WorkflowEvent::afterEnterStatus('Item06Workflow/new') => "afterNew", WorkflowEvent::afterEnterStatus('Item06Workflow/correction') => "postToCorrect", WorkflowEvent::beforeLeaveStatus('Item06Workflow/correction') => "postCorrected", WorkflowEvent::beforeEnterStatus('Item06Workflow/published') => "checkCanBePublished", WorkflowEvent::beforeChangeStatus('Item06Workflow/published', 'Item06Workflow/archive') => "canBeArchived", WorkflowEvent::beforeLeaveWorkflow('Item06Workflow') => 'beforeLeaveWorkflow', WorkflowEvent::afterLeaveWorkflow('Item06Workflow') => 'afterLeaveWorkflow'];
 }
All Usage Examples Of raoul2000\workflow\events\WorkflowEvent::beforeLeaveWorkflow