protected function getFollowingTransitions($alias, $id, $hydrationMode = self::HYDRATION_MODE_OBJECTS)
    {
        $transitionResults = [];
        $transitions = $this->transitionManager->findBySource($alias, $id);

        if ($transitions && count($transitions) > 0) {
            foreach ($transitions as $transition) {
                $currentAlias = $transition->getDestination();
                $currentId = $transition->getDestinationId();

                // Create TransitionResult.
                $transitionResult = $this->createTransitionResult(
                    $currentAlias,
                    $currentId,
                    $hydrationMode
                );

                if (!$transitionResult) {
                    continue;
                }

                $transitionResult->setId($transition->getId());
                $transitionResult->setTransition($transition);

                // Add to result-set.
                $transitionResults[] = $transitionResult;

                // Recursive call to get all following transitions.
                $transitionResults = array_merge(
                    $transitionResults,
                    $this->getFollowingTransitions($currentAlias, $currentId, $hydrationMode)
                );
            }
        }

        return $transitionResults;
    }
protected function getFollowingTransitions($alias, $id, $hydrationMode = self::HYDRATION_MODE_OBJECTS)
    {
        $transitionResults = [];
        $transitions = $this->transitionManager->findBySource($alias, $id);

        if ($transitions && count($transitions) > 0) {
            foreach ($transitions as $transition) {
                $currentAlias = $transition->getDestination();
                $currentId = $transition->getDestinationId();

                // Create TransitionResult.
                $transitionResult = $this->createTransitionResult(
                    $currentAlias,
                    $currentId,
                    $hydrationMode
                );

                if (!$transitionResult) {
                    continue;
                }

                $transitionResult->setId($transition->getId());
                $transitionResult->setTransition($transition);

                // Add to result-set.
                $transitionResults[] = $transitionResult;

                // Recursive call to get all following transitions.
                $transitionResults = array_merge(
                    $transitionResults,
                    $this->getFollowingTransitions($currentAlias, $currentId, $hydrationMode)
                );
            }
        }

        return $transitionResults;
    }
protected function getFollowingTransitions ( $ alias , $ id , $ hydrationMode = self :: HYDRATION_MODE_OBJECTS ) { $ transitionResults = [ ] ; $ transitions = $ this -> transitionManager -> findBySource ( $ alias , $ id ) ; if ( $ transitions && count ( $ transitions ) > 0 ) { foreach ( $ transitions as $ transition ) { $ currentAlias = $ transition -> getDestination ( ) ; $ currentId = $ transition -> getDestinationId ( ) ; // Create TransitionResult. $ transitionResult = $ this -> createTransitionResult ( $ currentAlias , $ currentId , $ hydrationMode ) ; if ( ! $ transitionResult ) { continue ; } $ transitionResult -> setId ( $ transition -> getId ( ) ) ; $ transitionResult -> setTransition ( $ transition ) ; // Add to result-set. $ transitionResults [ ] = $ transitionResult ; // Recursive call to get all following transitions. $ transitionResults = array_merge ( $ transitionResults , $ this -> getFollowingTransitions ( $ currentAlias , $ currentId , $ hydrationMode ) ) ; } } return $ transitionResults ; }
Returns next following Transition.

@param string $alias
@param int $id
@param string $hydrationMode

@return TransitionResult[]
Returns next following Transition .