20 lines
611 B
PHP
20 lines
611 B
PHP
|
<?php
|
||
|
|
||
|
namespace JeroenED\Website\Controller;
|
||
|
|
||
|
use JeroenED\Framework\Controller;
|
||
|
use JeroenED\Framework\Repository;
|
||
|
use JeroenED\Website\Repository\Page;
|
||
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||
|
use Symfony\Component\HttpFoundation\Response;
|
||
|
|
||
|
class DefaultController extends Controller
|
||
|
{
|
||
|
public function DefaultAction($page)
|
||
|
{
|
||
|
$pageRepo = new Page();
|
||
|
$page = $pageRepo->getPage($page);
|
||
|
return $this->render('/page.html.twig', ['header' => $page['header'], 'content' => $page['content']], $page['status']);
|
||
|
}
|
||
|
}
|