Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public function onKernelController(FilterControllerEvent $event) |
||
49 | { |
||
50 | $controller = $event->getController(); |
||
51 | if (method_exists($controller[0], 'getToolShortname')) { |
||
52 | $tool = $controller[0]->getToolShortname(); |
||
53 | if (!$this->container->getParameter("enable.$tool")) { |
||
54 | throw new NotFoundHttpException('This tool is disabled'); |
||
55 | } |
||
56 | } |
||
57 | } |
||
58 | } |
||
59 |