3

我对 symfony2 完全陌生,我在 symfony 中使用教义 orm 创建了一个简单的实体模型,但我不知道如何生成和使用 admin-generator,我实际上尝试并从这个 admin 生成器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
4

1 回答 1

2

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

GoGoAdminBundle_admin_go_go_admin_bundle_admin:
    resource: "@GoGoAdminBundle/Controller/Admin/"
    type: admingenerator
    prefix: /admin 
于 2013-01-30T13:06:45.237 回答