sbyaute / twigbootstrap-maker
TwigBootstrap Maker 帮助您创建为 twigbootstrap 主题包预配置的控制器和模板
1.0.3
2021-11-29 11:47 UTC
Requires
- php: >=7.1.3
- cnam/twigbootstrap-bundle: >=4.0
- doctrine/annotations: >=1.0
- kevinpapst/adminlte-bundle: >=3.2
- sensio/framework-extra-bundle: >=4
- symfony/console: >=4.4
- symfony/form: >=4.4
- symfony/maker-bundle: >=1.0
- symfony/security-bundle: >=4.4
- symfony/translation: >=4.4
- symfony/twig-bundle: >=4.4
- symfony/validator: >=4.4
README
此存储库包含 TwigBootstrapMaker 包,它帮助您根据 AdminLTE 包、TwigBootstrap 包 和 DataTables 包 创建控制器骨骼和模板。
最低要求
- Symfony 4.4
- PHP 7.1
- Twig 2.0
- AdminLTE 包
- TwigBootstrap 包
使用 Composer 安装
使用 composer 进行安装
composer require sbyaute/TwigBootstrap-Maker
然后,通过将其添加到项目 config/bundles.php 文件中注册的包列表中来启用该包
<?php return [ // ... Sbyaute\TwigBootstrapMakerBundle\TwigBootstrapMakerBundle::class => ['all' => true], ];
使用方法
此包在 make: 命名空间下提供几个命令。通过执行此命令列出它们
php bin/console list make:twigbootstrap
make:twigbootstrap:controller Creates a new controller class
make:twigbootstrap:crud Creates TwigBootstrap CRUD for Doctrine entity class
make:twigbootstrap:crudmodal Creates TwigBootstrap CRUD (modal mode)for Doctrine entity class
配置
此包不需要任何配置。但是,您可以配置基本布局和多个参数
php bin/console config:dump twig_bootstrap_maker
twig_bootstrap_maker:
base_layout: '@TwigBootstrap/layout.html.twig'
skeleton_dir: .../src/DependencyInjection/../Resources/skeleton/
翻译
翻译消息位于 messages 和 entity class 域。因此,您可以通过使用它们来更新它
php bin/console translation:update fr --force --output-format=yaml --domain=messages php bin/console translation:update fr --force --output-format=yaml --domain=[entity class]
许可和贡献者
在 MIT 许可下发布,有关更多信息,请参阅 LICENSE 文件。