sbyaute / frontbundle-maker

此包提供了一个界面,允许您基于 front-bundle 创建 CRUD 接口。

安装: 760

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.5 2022-11-06 13:54 UTC

This package is not auto-updated.

Last update: 2024-09-22 23:14:17 UTC


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 文件。