2017 © Pedro Peláez
 

symfony-bundle twig-exception

Use to make customizables Twig exception pages for routes or specific HTTP status codes

image

modnarlluf/twig-exception

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  • Monday, April 9, 2018
  • by modnarlluf
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 5 % Grown

The README.md

TwigExceptionBundle

About

Use to make customizables Twig exception pages for routes or specific HTTP status codes., (*1)

Features

  • Change default error templates from routes and status codes
  • Enable or disable custom error templates for debug environnement

Configuration

If you need to add custom route handlers, disable the bundle for some environnements or activate custom template for debug mode, you can do it through the configuration., (*2)

kwrz_twig_exception:
  enabled: true
  with_debug: false
  handlers:
    - { regex: ^\/admin, template: "MyBundle:Admin:error404.html.twig", status_code: [404] }
    - { regex: ^\/admin, template: "MyBundle:Admin:errorDefault.html.twig" }
    - { host: ^member\.domain\.tld, regex: ^\/, template: "MyBundle:Member:errorDefault.html.twig" }
    - { regex: ^\/, template: "MyBundle:Front:errorDefault.html.twig" }

Pay attention to the order in which your handlers are declared. There are processed in the same order as in the configuration. If you specify the status_code array in an handler row, the error template will be used only if the expected response status code is in this array., (*3)

By default, the kwrz_twig_exception.with_debug option is set to false. If you want to view custom error pages in kernel.debug mode, simply set this option to true., (*4)

If you want to disable this bundle in some environment, simply set the kwrz_twig_exception.enabled option to false., (*5)

Installation (Symfony 3.4+)

Require the modnarlluf/twig-exception package in your composer.json and update your dependencies., (*6)

$ composer require "modnarlluf/twig-exception"

The Versions

09/04 2018

dev-master

9999999-dev

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon
by Brice Sigura
by Bruno Nicolle

twig route exception view

09/04 2018

1.1

1.1.0.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon
by Brice Sigura
by Bruno Nicolle

twig route exception view

05/03 2018

1.0

1.0.0.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon
by Brice Sigura
by Bruno Nicolle

twig route exception view

27/01 2016

v0.4

0.4.0.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon
by Brice Sigura

twig route exception view

27/01 2016

dev-host_support

dev-host_support

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon

twig route exception view

21/01 2016

v0.3.1

0.3.1.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon

twig route exception view

26/11 2015

v0.3

0.3.0.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon

twig route exception view

07/12 2014

v0.2

0.2.0.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon

twig route exception view

07/12 2014

v0.1

0.1.0.0

Use to make customizables Twig exception pages for routes or specific HTTP status codes

  Sources   Download

MIT

The Requires

 

by Julien Demangeon

twig route exception view