sbyaute / frontbundle-maker
此包提供了一个界面,允许您基于 front-bundle 创建 CRUD 接口。
1.0.5
2022-11-06 13:54 UTC
Requires
- php: >=7.1.3
- cnam/front-bundle: >=5.1.0
- doctrine/annotations: >=1.0
- 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
此存储库包含 FrontBundleMaker 包,它可以帮助您根据 FrontBundle 包 创建控制器骨架和模板。
最低要求
使用 Composer 安装
使用 composer 安装
composer require sbyaute/FrontBundle-Maker
然后,通过将其添加到项目 config/bundles.php 文件中注册的包列表中来启用此包。
<?php return [ // ... Sbyaute\FrontBundleMakerBundle\FrontBundleMakerBundle::class => ['all' => true], ];
使用方法
此包在 make 命名空间下提供了几个命令。执行此命令列出所有命令。
php bin/console list make:frontbundle make:frontbundle:controller Creates a new controller class make:frontbundle:crud Creates FrontBundle CRUD for Doctrine entity class make:frontbundle:crudmodal Creates FrontBundle CRUD (modal mode) for Doctrine entity class
配置
此包不需要任何配置。但您可以根据需要配置基本布局和多个参数。
php bin/console config:dump twig_bootstrap_maker
twig_bootstrap_maker:
base_layout: '@FrontBundle/layout.html.twig'
skeleton_dir: .../src/DependencyInjection/../Resources/skeleton/
翻译
翻译消息位于 messages 和实体类域。因此,您可以通过以下方式更新它。
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 文件。