定制 djboris88/timber-debugger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

djboris88/timber-debugger

最新稳定版本:1.1.0

Composer 安装命令:

composer require djboris88/timber-debugger

包简介

Composer package which provides some extra debugging options for Timber

README 文档

README

Package which provides some extra debugging options for Timber

Installation

To install the latest stable version of this component, open a console and execute the following command:

composer require djboris88/timber-debugger

Usage

These extensions are only active when WP_DEBUG is defined and set to true. Twig Extensions will automatically be registered and applied.

Commented Include

Package: djboris88/twig-commented-include (GitHub, Packagist)

This is a simple Twig Extension which helps debugging and navigating through many Twig partials in your project. It outputs a HTML comments before and after each include statement while rendering the template. Comments look like this:

<!-- Begin output of "_partials/_navigation.twig" -->
<div class="navigation" role="navigation" data-navigation>...</div>
<!-- / End output of "_partials/_navigation.twig" -->

Dump extension

Package: hellonico/twig-dump-extension (GitHub, Packagist)

Standalone Symfony Var Dumper Twig extension. Add {{ dump() }} in your twig templates to see it in action.

{{ dump(foo) }}
{% dump foo %}
{% dump foo, bar %}

Twig Breakpoints

Package : ajgl/breakpoint-twig-extension (GitHub, Packagist)

This component allows you set breakpoints in twig templates.
Requires the Xdebug PHP extension to be installed.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>title</title>
  </head>
  <body>
    {{ breakpoint() }}
  </body>
</html>

Once stopped, your debugger will allow you to inspect the $environment and $context variables.

Function arguments
Any argument passed to the twig function will be added to the $arguments array, so you can inspect it easily.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>title</title>
  </head>
  <body>
    {{ breakpoint(app.user, app.session) }}
  </body>
</html>

License

This component is under the GPL 3.0 license. See the complete license in the LICENSE file.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

Author Information

Developed with ♥ by Boris Đemrovski.

If you find this component useful, please add a ★ in the GitHub repository page and/or the Packagist package page.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2018-12-04