public function getTransitions($statusId, $defaultWorkflowId = null)
	{

		list($wId, $lid) = $this->parseStatusId($statusId, $defaultWorkflowId);
		$statusId = $wId.self::SEPARATOR_STATUS_NAME.$lid;

		if ( ! array_key_exists($statusId, $this->_t) ) {

			$start = $this->getStatus($statusId);
			if ( $start == null) {
				throw new WorkflowException('start status not found : id = '. $statusId);
			}

			$wDef = $this->getWorkflowDefinition($wId);

			$trDef = isset($wDef[self::KEY_NODES][$start->getId()][self::KEY_EDGES])
				? $wDef[self::KEY_NODES][$start->getId()][self::KEY_EDGES]
				: null;

			$transitions = [];
			if ( $trDef != null) {

				foreach ($trDef as $endStId => $trCfg) {
					$ids = $this->parseStatusId($endStId, $wId);
					$endId =  implode(self::SEPARATOR_STATUS_NAME, $ids);
					$end = $this->getStatus($endId);

					if ( $end == null ) {
						throw new WorkflowException('end status not found : start(id='.$statusId.') end(id='.$endStId.')');
					} else {
						$trCfg['class' ] = $this->getClassMapByType(self::TYPE_TRANSITION);
						$trCfg['start' ] = $start;
						$trCfg['end'   ] = $end;
						$trCfg['source'] = $this;
						$transitions[$endId] = Yii::createObject($trCfg);
					}
				}
			}
			$this->_t[$statusId] = $transitions;
		}
		return $this->_t[$statusId];
	}
public function getTransitions($statusId, $defaultWorkflowId = null)
	{

		list($wId, $lid) = $this->parseStatusId($statusId, $defaultWorkflowId);
		$statusId = $wId.self::SEPARATOR_STATUS_NAME.$lid;

		if ( ! array_key_exists($statusId, $this->_t) ) {

			$start = $this->getStatus($statusId);
			if ( $start == null) {
				throw new WorkflowException('start status not found : id = '. $statusId);
			}

			$wDef = $this->getWorkflowDefinition($wId);

			$trDef = isset($wDef[self::KEY_NODES][$start->getId()][self::KEY_EDGES])
				? $wDef[self::KEY_NODES][$start->getId()][self::KEY_EDGES]
				: null;

			$transitions = [];
			if ( $trDef != null) {

				foreach ($trDef as $endStId => $trCfg) {
					$ids = $this->parseStatusId($endStId, $wId);
					$endId =  implode(self::SEPARATOR_STATUS_NAME, $ids);
					$end = $this->getStatus($endId);

					if ( $end == null ) {
						throw new WorkflowException('end status not found : start(id='.$statusId.') end(id='.$endStId.')');
					} else {
						$trCfg['class' ] = $this->getClassMapByType(self::TYPE_TRANSITION);
						$trCfg['start' ] = $start;
						$trCfg['end'   ] = $end;
						$trCfg['source'] = $this;
						$transitions[$endId] = Yii::createObject($trCfg);
					}
				}
			}
			$this->_t[$statusId] = $transitions;
		}
		return $this->_t[$statusId];
	}
public function getTransitions ( $ statusId , $ defaultWorkflowId = null ) { list ( $ wId , $ lid ) = $ this -> parseStatusId ( $ statusId , $ defaultWorkflowId ) ; $ statusId = $ wId . self :: SEPARATOR_STATUS_NAME . $ lid ; if ( ! array_key_exists ( $ statusId , $ this -> _t ) ) { $ start = $ this -> getStatus ( $ statusId ) ; if ( $ start == null ) { throw new WorkflowException ( 'start status not found : id = ' . $ statusId ) ; } $ wDef = $ this -> getWorkflowDefinition ( $ wId ) ; $ trDef = isset ( $ wDef [ self :: KEY_NODES ] [ $ start -> getId ( ) ] [ self :: KEY_EDGES ] ) ? $ wDef [ self :: KEY_NODES ] [ $ start -> getId ( ) ] [ self :: KEY_EDGES ] : null ; $ transitions = [ ] ; if ( $ trDef != null ) { foreach ( $ trDef as $ endStId => $ trCfg ) { $ ids = $ this -> parseStatusId ( $ endStId , $ wId ) ; $ endId = implode ( self :: SEPARATOR_STATUS_NAME , $ ids ) ; $ end = $ this -> getStatus ( $ endId ) ; if ( $ end == null ) { throw new WorkflowException ( 'end status not found : start(id=' . $ statusId . ') end(id=' . $ endStId . ')' ) ; } else { $ trCfg [ 'class' ] = $ this -> getClassMapByType ( self :: TYPE_TRANSITION ) ; $ trCfg [ 'start' ] = $ start ; $ trCfg [ 'end' ] = $ end ; $ trCfg [ 'source' ] = $ this ; $ transitions [ $ endId ] = Yii :: createObject ( $ trCfg ) ; } } } $ this -> _t [ $ statusId ] = $ transitions ; } return $ this -> _t [ $ statusId ] ; }
Returns all out going transitions leaving the status whose id is passed as argument.
This method also create instances for the initial status and all statuses that can be
reached from it.

@see IWorkflowSource::getTransitions()
Returns all out going transitions leaving the status whose id is passed as argument . This method also create instances for the initial status and all statuses that can be reached from it .