Piou-piou /
RibsAdminBundle
| 1 | <?php |
||
| 2 | |||
| 3 | namespace PiouPiou\RibsAdminBundle\Controller; |
||
| 4 | |||
| 5 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
||
| 6 | use Symfony\Component\Routing\Annotation\Route; |
||
| 7 | use Symfony\Component\HttpFoundation\Response; |
||
| 8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
||
| 9 | |||
| 10 | class RenderPageController extends AbstractController |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @Route("/page/{url}", name="page", requirements={"url" = "[a-zA-Z0-9\-\_\/]*"}) |
||
| 14 | * @param string $url |
||
| 15 | * @return Response |
||
| 16 | */ |
||
| 17 | public function renderPage(string $url): Response |
||
| 18 | { |
||
| 19 | $em = $this->getDoctrine()->getManager(); |
||
| 20 | |||
| 21 | $page = $em->getRepository("RibsAdminBundle:Page")->findOneBy(["url" => $url]); |
||
| 22 | $navigation = $em->getRepository("RibsAdminBundle:Navigation")->findAllNavigation(); |
||
|
0 ignored issues
–
show
|
|||
| 23 | |||
| 24 | if ($page) { |
||
| 25 | return $this->render("@RibsAdmin/page.html.twig", ["page" => $page, "navigation" => $navigation]); |
||
| 26 | } |
||
| 27 | |||
| 28 | throw new NotFoundHttpException("The required page does not exist"); |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.