cache = $cache; $this->kernel = $kernel; } public function getBanner() : string { $banner = $this->getParameter('banner'); if (empty($banner)) { $banner_path = $this->kernel->getProjectDir() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'banner.md'; return file_get_contents($banner_path); } return $banner; } /** * @Route("/", name="homepage") */ public function homepage(GitVersionInfo $versionInfo) { return $this->render('homepage.html.twig', [ 'banner' => $this->getBanner(), 'git_branch' => $versionInfo->getGitBranchName(), 'git_commit' => $versionInfo->getGitCommitHash() ]); } }