shopro/sylius-hook-highlighter-plugin
最新稳定版本:v0.1.0
Composer 安装命令:
composer require shopro/sylius-hook-highlighter-plugin
包简介
Highlighting Twig hooks in your Sylius project.
README 文档
README
How to install:
composer require --dev shopro/sylius-hook-highlighter-plugin
Add this to config/bundles.php:
<?php return [ // ...Your other bundles Shopro\SyliusHookHighlighterPlugin\SyliusHookHighlighterPlugin::class => ['dev' => true], ];
Create a file called config/packages/dev/hook_highlighter.yaml:
imports: - { resource: "@SyliusHookHighlighterPlugin/config/config.yaml" }
You’re done.
How to use:
In the Sylius interface, you'll see a hook icon. This works in both admin and shop. When you click it, you'll enter 'highlight mode'. This allows you to select elements that are within hooks. If you click an element while in highlight mode, a popup will appear, giving you all the information you need to override or extend the hook.
If a hook is empty (having no hookables in it), it will show a hook icon. Clicking that will bring up a similar popup, with only the hook name.
Important:
This bundle only works in Sylius 2 or higher. Sylius 1 does not have Twig hooks.
This bundle is little more than some JS and a few Twig templates, but using it will make you much faster at extending hooks than manually perusing the HTML comments.
统计信息
- 总下载量: 793
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-26
