public function initStatus()
	{
		if ( $this->getStatusAccessor() != null) {
			$oStatus = $this->_statusAccessor->readStatus($this->owner);
		} else {
			$oStatus = $this->getOwnerStatus();
		}

		if ( ! empty($oStatus) ) {
			$status = $this->_wfSource->getStatus($oStatus, self::isAttachedTo($this->owner) ? $this->selectDefaultWorkflowId() : null);
			if ($status === null) {
				throw new WorkflowException('Status not found : '.$oStatus);
			}
			$this->setStatusInternal($status);
		} else {
			$this->_status = null;
		}
	}
public function initStatus()
	{
		if ( $this->getStatusAccessor() != null) {
			$oStatus = $this->_statusAccessor->readStatus($this->owner);
		} else {
			$oStatus = $this->getOwnerStatus();
		}

		if ( ! empty($oStatus) ) {
			$status = $this->_wfSource->getStatus($oStatus, self::isAttachedTo($this->owner) ? $this->selectDefaultWorkflowId() : null);
			if ($status === null) {
				throw new WorkflowException('Status not found : '.$oStatus);
			}
			$this->setStatusInternal($status);
		} else {
			$this->_status = null;
		}
	}
public function initStatus ( ) { if ( $ this -> getStatusAccessor ( ) != null ) { $ oStatus = $ this -> _statusAccessor -> readStatus ( $ this -> owner ) ; } else { $ oStatus = $ this -> getOwnerStatus ( ) ; } if ( ! empty ( $ oStatus ) ) { $ status = $ this -> _wfSource -> getStatus ( $ oStatus , self :: isAttachedTo ( $ this -> owner ) ? $ this -> selectDefaultWorkflowId ( ) : null ) ; if ( $ status === null ) { throw new WorkflowException ( 'Status not found : ' . $ oStatus ) ; } $ this -> setStatusInternal ( $ status ) ; } else { $ this -> _status = null ; } }
Initialize the internal status value based on the owner model status attribute.

The <b>status</b> attribute belonging to the owner model is retrieved and if not
empty, converted into the corresponding Status object instance.
This method does not trigger any event, it is only restoring the model into its workflow. It is invoked when the behavior
is attached to the model, and on AFTER_FIND event.

@throws \raoul2000\workflow\base\WorkflowException if the status attribute could not be converted into a Status object
Initialize the internal status value based on the owner model status attribute .