Crazy Chuck
Crazy Chuck

Reputation: 555

How to generate admin from symfony2 admin-generator

I'm totally new to symfony2 ,I created a simple entity model using doctrine orm in symfony but i don't know how to generate and use admin-generator ,i actually tried and installed all the required bundle from this admin generator http://symfony2admingenerator.org/. and even tried to setup it using

php app/console admin:setup

everything went fine but i don't know how to view admin side whether its generated or not.

my generator.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: ~

my entity class located at

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

my admin bundle located at

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

Upvotes: 3

Views: 7170

Answers (1)

Crazy Chuck
Crazy Chuck

Reputation: 555

I'm now able to access the admin i just configured by routing.yml

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

Upvotes: 2

Related Questions