src/WorkflowViewWidget.php
public function init()
    {
        parent::init();
        if ( ! isset($this->containerId)){
        	throw new InvalidConfigException("Parameter 'containerId' is missing ");
        }
        if ( ! isset($this->visNetworkId)){
        	$this->visNetworkId = uniqid('vis_');
        }        
        if ( ! isset($this->workflow)){
        	throw new InvalidConfigException("Parameter 'workflow' is missing ");
        } 
        
        if ( $this->workflow instanceof \yii\base\Model ) {
        	 
        	if ( ! \raoul2000\workflow\base\SimpleWorkflowBehavior::isAttachedTo($this->workflow)) {
        		throw new InvalidConfigException("The model passed as parameter 'workflow' is not attached to a SimpleWorkflowBehavior.");
        	}

        	$this->_workflow = $this->workflow->getWorkflow();
        	if ( $this->_workflow == null) {
        		$this->_workflow = $this->workflow->getWorkflowSource()->getWorkflow(
        			$this->workflow->getDefaultWorkflowId()
        		);
        	}
        } elseif ( $this->workflow instanceof \raoul2000\workflow\base\WorkflowInterface ) {
        	$this->_workflow = $this->workflow;
        } 
        
        if ( $this->_workflow == null) {
        	throw new InvalidConfigException("Failed to find workflow instance from parameter 'workflow'");
        }
        $this->_visId = uniqid();
    }
public function init()
    {
        parent::init();
        if ( ! isset($this->containerId)){
        	throw new InvalidConfigException("Parameter 'containerId' is missing ");
        }
        if ( ! isset($this->visNetworkId)){
        	$this->visNetworkId = uniqid('vis_');
        }        
        if ( ! isset($this->workflow)){
        	throw new InvalidConfigException("Parameter 'workflow' is missing ");
        } 
        
        if ( $this->workflow instanceof \yii\base\Model ) {
        	 
        	if ( ! \raoul2000\workflow\base\SimpleWorkflowBehavior::isAttachedTo($this->workflow)) {
        		throw new InvalidConfigException("The model passed as parameter 'workflow' is not attached to a SimpleWorkflowBehavior.");
        	}

        	$this->_workflow = $this->workflow->getWorkflow();
        	if ( $this->_workflow == null) {
        		$this->_workflow = $this->workflow->getWorkflowSource()->getWorkflow(
        			$this->workflow->getDefaultWorkflowId()
        		);
        	}
        } elseif ( $this->workflow instanceof \raoul2000\workflow\base\WorkflowInterface ) {
        	$this->_workflow = $this->workflow;
        } 
        
        if ( $this->_workflow == null) {
        	throw new InvalidConfigException("Failed to find workflow instance from parameter 'workflow'");
        }
        $this->_visId = uniqid();
    }
(non-PHPdoc)
@see \yii\base\Object::init()