Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41f99d5

Browse files
committed
Fix service use
1 parent af089f0 commit 41f99d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cookbook/controller/error_pages.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ example, we gonna override the showAction method::
228228
# src/AppBundle/Controller/ExceptionController.php
229229
230230
namespace AppBundle\Controller;
231-
231+
232232
use Symfony\Component\HttpFoundation\Request;
233233
use Symfony\Component\HttpKernel\Exception\FlattenException;
234234
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
@@ -240,10 +240,10 @@ example, we gonna override the showAction method::
240240
{
241241
$currentContent = $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1));
242242
$showException = $request->attributes->get('showException', $this->debug); // As opposed to an additional parameter, this maintains BC
243-
243+
244244
// $code = $exception->getStatusCode();
245245
$code = 500; // Route exceptions will throw status code 500
246-
246+
247247
return new Response($this->twig->render(
248248
(string) $this->findTemplate($request, $request->getRequestFormat(), $code, $showException),
249249
array(
@@ -275,7 +275,7 @@ To finally enable the custom exception controller, set the :ref:`twig.exception_
275275
276276
# app/config/config.yml
277277
twig:
278-
exception_controller: appbundle.twig.controller.exception:showAction
278+
exception_controller: app.twig.exception_controller:showAction
279279
280280
.. code-block:: xml
281281
@@ -290,15 +290,15 @@ To finally enable the custom exception controller, set the :ref:`twig.exception_
290290
http://symfony.com/schema/dic/twig/twig-1.0.xsd">
291291
292292
<twig:config>
293-
<twig:exception-controller>appbundle.twig.controller.exception:showAction</twig:exception-controller>
293+
<twig:exception-controller>app.twig.exception_controller:showAction</twig:exception-controller>
294294
</twig:config>
295295
</container>
296296
297297
.. code-block:: php
298298
299299
// app/config/config.php
300300
$container->loadFromExtension('twig', array(
301-
'exception_controller' => 'appbundle.twig.controller.exception:showAction',
301+
'exception_controller' => 'app.twig.exception_controller:showAction',
302302
// ...
303303
));
304304

0 commit comments

Comments
 (0)