Beginner-Question: Admingenerator, named route to it and get it running

36 views
Skip to first unread message

horstp...@gmail.com

unread,
Apr 22, 2015, 9:13:06 AM4/22/15
to symfony2adm...@googlegroups.com
Hello,

I'm new to Symfony2 and just wanted to use Admingenerator for a simple learning project and somehow I'm stucked with the usage of the AdmingeneratorBundle.

Steps I did:

* Generated entities in my bundle
* Created Admingenerator:
** php app/console admin:generate-admin
*** including the update (generated by app/console) of route.yml.


company_project_bundle_admin:
    resource: "@CompanyProjectBundle/Controller/Admin/"
    type:     admingenerator
    prefix:   /admin


The bundle files are existing accordingly, at least I think they are:

Company
 Bundle
  ProjectBundle
   Controller
    Admin
     ActionsController.php
     ListController.php
     EditController.php
     ShowController.php
     NewController.php
    DefaultController.php


As dashboard_route for admingenerator_generator in config.yml I use maddin_project_bundle_admin instead of ~.
But somehow, this named route does not work and i get the following error while requesting http://symfony.private.local/app_dev.php/admin/:

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "company_project_bundle_admin" as such route does not exist.") in AdmingeneratorGeneratorBundle::header.html.twig at line 3.

If I use ~ as dashboard_route I get the following error:

An exception has been thrown during the rendering of a template ("0") in AdmingeneratorGeneratorBundle::header.html.twig at line 3.



It might be, that I missed a basic part of documentation of how to use Admingenerator for an existing bundle with existing entities (or models),
so any newbie help would be very cool :)


Thank you in advance!

Reply all
Reply to author
Forward
0 new messages