Completed
Push — master ( ae5e03...0447ee )
by Jeroen
10:35 queued 04:37
created

Controller/AbstractRedirectController.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\LeadGenerationBundle\Controller;
4
5
use Kunstmaan\LeadGenerationBundle\Entity\Popup\AbstractPopup;
6
use Symfony\Component\Routing\Annotation\Route;
7
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8
9
abstract class AbstractRedirectController extends Controller
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Bundle\Framework...e\Controller\Controller has been deprecated with message: since Symfony 4.2, use "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
10
{
11
    /**
12
     * @Route("/{popup}", name="redirect_index", requirements={"popup": "\d+"})
13
     */
14
    public function indexAction($popup)
15
    {
16
        /** @var AbstractPopup $thePopup */
17
        $thePopup = $this->getDoctrine()->getRepository(AbstractPopup::class)->find($popup);
18
19
        return $this->render($this->getIndexTemplate(), array(
20
            'popup' => $thePopup,
21
        ));
22
    }
23
24
    protected function getIndexTemplate()
25
    {
26
        return '@KunstmaanLeadGeneration/Redirect/index.html.twig';
27
    }
28
}
29