public function setInitialState()
    {
        foreach ($this->states as $status) {
            if ($status->getType() == StatusInterface::TYPE_INITIAL) {
                $this->currentStatus = $status;

                return;
            }
        }
        throw new WorkflowException('No initial state found for the workflow', 90, NULL);
    }
public function setInitialState()
    {
        foreach ($this->states as $status) {
            if ($status->getType() == StatusInterface::TYPE_INITIAL) {
                $this->currentStatus = $status;

                return;
            }
        }
        throw new WorkflowException('No initial state found for the workflow', 90, NULL);
    }
public function setInitialState ( ) { foreach ( $ this -> states as $ status ) { if ( $ status -> getType ( ) == StatusInterface :: TYPE_INITIAL ) { $ this -> currentStatus = $ status ; return ; } } throw new WorkflowException ( 'No initial state found for the workflow' , 90 , NULL ) ; }
Set the initial state

@return void
Set the initial state