gpt4 book ai didi

symfony - 如何从 symfony2 管理员生成器生成管理员

转载 作者:行者123 更新时间:2023-12-04 08:47:58 25 4
gpt4 key购买 nike

我是 symfony2 的新手,我在 symfony 中使用 doctrine orm 创建了一个简单的实体模型,但我不知道如何生成和使用 admin-generator,我实际上尝试并安装了来自这个管理生成器的所有必需的包http://symfony2admingenerator.org/ .甚至尝试使用

进行设置
php app/console admin:setup

一切顺利,但我不知道如何查看管理端是否已生成。

我的生成器.yml

generator: admingenerator.generator.doctrine
params:
model: Go\UserBundle\Entity\User
namespace_prefix: Go
bundle_name: UserBundle
fields:
firstname:
help: If you want to see this content on you website
lastname:
help: If you want to see this content on you website

builders:
list:
params:
firstname: Here is a beautiful title no ???
display: [ id, firstname, firstname, email ]
max_per_page: 3
actions:
new: ~
object_actions:
edit: ~
delete: ~
filters:
params:
fields:
release_date:
formType: date_range
display: [ id, firstname, firstname, email ]

new:
params:
title: You're creating a new movie
display: [ firstname, firstname, email ]
actions:
list: ~
edit:
params:
title: You're editing the movie ""
display:
"NONE": [ email ]
"Other informations": [ ]
actions:
list: ~
delete: ~

我的实体类位于

src\Go\UserBundle\Entity\User.php
src\Go\UserBundle\Entity\UserRepository.php

我的管理包位于

Go\GoAdminBundle\Controller\Admin\DeleteController.php
Go\GoAdminBundle\Controller\Admin\EditController.php
Go\GoAdminBundle\Controller\Admin\ListController.php
Go\GoAdminBundle\Controller\Admin\NewController.php

最佳答案

我现在可以访问我刚刚通过 routing.yml 配置的管理员

GoGoAdminBundle_admin_go_go_admin_bundle_admin:
resource: "@GoGoAdminBundle/Controller/Admin/"
type: admingenerator
prefix: /admin

关于symfony - 如何从 symfony2 管理员生成器生成管理员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10664657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com