承接 modnarlluf/twig-exception 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

modnarlluf/twig-exception

Composer 安装命令:

composer require modnarlluf/twig-exception

包简介

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

README 文档

README

About

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

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.

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.

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.

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

Installation (Symfony 3.4+)

Require the modnarlluf/twig-exception package in your composer.json and update your dependencies.

$ composer require "modnarlluf/twig-exception"

统计信息

  • 总下载量: 50
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固