public function render() { $template = $this->getTemplate(); $template->setFile(__DIR__ . '/page.latte'); $template->page = $this->page; $template->isOnlyIntroShown = $this->isOnlyIntroShown; $template->commentsCount = $this->commentsCount; $template->translate = function ($string, $count = null) { return $this->translator->translate($string, $count, [], null, $this->page->getLocaleCode()); }; $template->render(); }