Skip to content

Commit 3e0cdb9

Browse files
committedSep 23, 2013
Updating some code that was correct in the script, but had gotten lost in the finish product of the code
1 parent 2f960a3 commit 3e0cdb9

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
 

‎finish/app/config/config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ imports:
44
- { resource: "@EventBundle/Resources/config/services.yml" }
55
- { resource: "@UserBundle/Resources/config/services.yml" }
66

7+
services:
8+
yoda_event.controller.exception_controller:
9+
parent: twig.controller.exception
10+
class: Yoda\EventBundle\Controller\ExceptionController
11+
712
framework:
813
#esi: ~
914
translator: { fallback: %locale% }
@@ -24,7 +29,7 @@ framework:
2429
twig:
2530
debug: %kernel.debug%
2631
strict_variables: %kernel.debug%
27-
exception_controller: "EventBundle:Exception:show"
32+
exception_controller: "yoda_event.controller.exception_controller:showAction"
2833

2934
# Assetic Configuration
3035
assetic:

‎finish/src/Yoda/EventBundle/Controller/ExceptionController.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,27 @@
44

55
use Symfony\Bundle\TwigBundle\Controller\ExceptionController as BaseController;
66
use Symfony\Component\HttpKernel\Exception\FlattenException;
7+
use Symfony\Component\HttpFoundation\Request;
78
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
89

910
class ExceptionController extends BaseController
1011
{
1112
private $exceptionClass;
1213

13-
public function showAction(FlattenException $exception, DebugLoggerInterface $logger = null, $format = 'html')
14+
public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null, $format = 'html')
1415
{
1516
$this->exceptionClass = $exception->getClass();
1617

17-
return parent::showAction($exception, $logger, $format);
18+
return parent::showAction($request, $exception, $logger, $format);
1819
}
1920

20-
protected function findTemplate($templating, $format, $code, $debug)
21+
protected function findTemplate(Request $request, $format, $code, $debug)
2122
{
2223
if (!$debug && $this->exceptionClass == 'Yoda\EventBundle\Exception\EventNotFoundException') {
2324
return 'EventBundle:Exception:error404.html.twig';
2425
}
2526

26-
return parent::findTemplate($templating, $format, $code, $debug);
27+
return parent::findTemplate($request, $format, $code, $debug);
2728
}
2829

2930

0 commit comments

Comments
 (0)
Please sign in to comment.