Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | abstract class Jquery_ extends JsUtils { |
||
8 | protected $container; |
||
9 | |||
10 | /** |
||
11 | * Performs jQuery compilation and displays a view |
||
12 | * @param string $viewName |
||
13 | * @param array $parameters |
||
14 | * @return Response |
||
15 | */ |
||
16 | public function renderView($viewName,$parameters=[]){ |
||
17 | $twig=$this->container->get("twig"); |
||
18 | $this->compile($parameters); |
||
19 | return new Response($twig->render($viewName, $parameters)); |
||
20 | } |
||
21 | |||
22 | public function generateUrl($path){ |
||
23 | $request=Request::createFromGlobals(); |
||
24 | return $request->getBaseUrl().$path; |
||
25 | } |
||
27 |