/** * @param Tournament $tournament */ public function notifyAboutNewTournament(Tournament $tournament) { $title = $this->container->get("templating")->render('Post/newtournament.topic.html.twig', ['tournament' => $tournament]); $postModel = new Post($this->container->getParameter("app_immortalchess.forum_playzone"), $tournament->getGameParams()->getTimeBase() === 180000 ? self::THREAD_FOR_3_MINUTES : self::THREAD_FOR_5_MINUTES, $this->container->getParameter("app_immortalchess.post_username_for_calls"), $this->container->getParameter("app_immortalchess.post_userid_for_calls"), $title, $this->container->get("templating")->render('Post/newtournament.html.twig', ['tournament' => $tournament])); $postModel->setThreadTitle($title); return $this->container->get("immortalchessnet.service.publish")->publishNewPost($postModel); }