src/PHPDish/Bundle/ForumBundle/Controller/TopicController.php
public function getUserTopicsAction($username, Request $request)
    {
        $user = $this->getUserManager()->findUserByName($username);
        $topics = $this->getTopicManager()->findUserTopics($user, $request->query->getInt('page', 1));

        return $this->render($this->configuration->getTemplate('Topic:user_topics.html.twig'), [
            'user' => $user,
            'topics' => $topics,
        ]);
    }
public function getUserTopicsAction($username, Request $request)
    {
        $user = $this->getUserManager()->findUserByName($username);
        $topics = $this->getTopicManager()->findUserTopics($user, $request->query->getInt('page', 1));

        return $this->render($this->configuration->getTemplate('Topic:user_topics.html.twig'), [
            'user' => $user,
            'topics' => $topics,
        ]);
    }
用户的帖子.
@Route("/users/{username}", name="user_view")
@Route("/users/{username}/topics", name="user_topics")

@param string  $username
@param Request $request

@return Response