src/Application/Controller/AboutController.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Application\Controller;
  3. use App\Admin\Document\Article;
  4. use App\Admin\Document\Page;
  5. use App\Admin\Document\Project;
  6. use App\Admin\Document\Tag;
  7. use phpDocumentor\Reflection\Types\Parent_;
  8. use Symfony\Component\HttpFoundation\Request;
  9. use \Symfony\Component\Routing\Annotation\Route;
  10. class AboutController extends AbstractPageController
  11. {
  12.     protected function getPageUrl() {
  13.         return 'about';
  14.     }
  15.     /**
  16.      * @Route("/about", name="about")
  17.      * @param Request $request
  18.      * @return \Symfony\Component\HttpFoundation\Response
  19.      */
  20.     public function index(Request $request)
  21.     {
  22.         $page $this->setSeoByUrl($this->getPageUrl(), $request->getLocale());
  23.         return $this->render(
  24.             'application/about/index.html.twig', [
  25.                 'projects' => $this->getDocumentRepository(Project::class)->findBy(['active' => true], ['date' => 'desc']),
  26.                 'page' => $page,
  27.             ]
  28.         );
  29.     }
  30. }