public function getTransitions($alias, $id, $hydrationMode = self::HYDRATION_MODE_OBJECTS)
    {
        $current = $this->getCurrentTransition($alias, $id, $hydrationMode);

        if ($current === null) {
            throw new EntityNotFoundException($alias, $id);
        }

        $currentTransition = $current->getTransition();

        $allTransitions['current'] = $current;

        // Find all previous transitions.
        if ($currentTransition) {
            $allTransitions['previous'] = array_reverse(
                $this->getPreviousTransitions(
                    $currentTransition->getSource(),
                    $currentTransition->getSourceId(),
                    $hydrationMode
                )
            );
        }

        // Find all following transitions.
        $allTransitions['following'] = $this->getFollowingTransitions(
            $alias,
            $id,
            $hydrationMode
        );

        return $allTransitions;
    }
public function getTransitions($alias, $id, $hydrationMode = self::HYDRATION_MODE_OBJECTS)
    {
        $current = $this->getCurrentTransition($alias, $id, $hydrationMode);

        if ($current === null) {
            throw new EntityNotFoundException($alias, $id);
        }

        $currentTransition = $current->getTransition();

        $allTransitions['current'] = $current;

        // Find all previous transitions.
        if ($currentTransition) {
            $allTransitions['previous'] = array_reverse(
                $this->getPreviousTransitions(
                    $currentTransition->getSource(),
                    $currentTransition->getSourceId(),
                    $hydrationMode
                )
            );
        }

        // Find all following transitions.
        $allTransitions['following'] = $this->getFollowingTransitions(
            $alias,
            $id,
            $hydrationMode
        );

        return $allTransitions;
    }
public function getTransitions ( $ alias , $ id , $ hydrationMode = self :: HYDRATION_MODE_OBJECTS ) { $ current = $ this -> getCurrentTransition ( $ alias , $ id , $ hydrationMode ) ; if ( $ current === null ) { throw new EntityNotFoundException ( $ alias , $ id ) ; } $ currentTransition = $ current -> getTransition ( ) ; $ allTransitions [ 'current' ] = $ current ; // Find all previous transitions. if ( $ currentTransition ) { $ allTransitions [ 'previous' ] = array_reverse ( $ this -> getPreviousTransitions ( $ currentTransition -> getSource ( ) , $ currentTransition -> getSourceId ( ) , $ hydrationMode ) ) ; } // Find all following transitions. $ allTransitions [ 'following' ] = $ this -> getFollowingTransitions ( $ alias , $ id , $ hydrationMode ) ; return $ allTransitions ; }
Returns the current, all previous and following transitions.

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

@throws EntityNotFoundException

@return array
Returns the current all previous and following transitions .