protected function getNextPreviousTransition($destination, $destinationId, $hydrationMode)
    {
        $transition = $this->transitionManager->findOneByDestination($destination, $destinationId);

        if ($transition !== null) {
            $transitionResult = $this->createTransitionResult(
                $transition->getDestination(),
                $transition->getDestinationId(),
                $hydrationMode
            );

            if (!$transitionResult) {
                return;
            }

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

            return $transitionResult;
        }

        return null;
    }