core23 / twig-formatter-bundle
此包已被废弃,不再维护。未建议替代包。
此包为 Sonata FormatterBundle 提供了一个 twig 格式化器。
dev-master / 0.x-dev
2020-04-23 15:21 UTC
Requires
- php: ^7.2
- sonata-project/formatter-bundle: ^4.0
- symfony/config: ^4.2
- symfony/dependency-injection: ^4.2
- symfony/expression-language: ^4.2
- symfony/framework-bundle: ^4.2
- symfony/http-foundation: ^4.2
- symfony/http-kernel: ^4.2
- twig/twig: ^2.4
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.3
- ergebnis/composer-normalize: ^2.0.1
- sonata-project/block-bundle: ^3.18
- symfony/browser-kit: ^4.4
This package is auto-updated.
Last update: 2020-06-23 15:37:41 UTC
README
此包为 twig 提供了一个 Sonata FormatterBundle 格式化器。
安装
打开命令行,进入您的项目目录,并执行以下命令以下载此包的最新稳定版本
composer require core23/twig-formatter-bundle
启用 Bundle
然后,通过将其添加到项目 config/bundles.php
文件中注册的 Bundle 列表中启用此 Bundle
// config/bundles.php return [ // ... Core23\TwigFormatterBundle\Core23TwigFormatterBundle::class => ['all' => true], ];
要使用新的格式化器,请在您的项目 config/packages/sonata_formatter.yaml
文件中注册格式化器
sonata_formatter: formatters: twig: service: core23_twig_formatter.formatter