【发布时间】:2016-08-01 22:33:33
【问题描述】:
我正在使用我构建的自定义捆绑包,并且我已经安装了 FOSUserBundle。
在我的包中,我有UserEntity,它有它的控制器,它的路由前缀为:/admin/user。我希望路由 admin_user_show 从 FOSUserBundle:Profile:show 获取操作
这是routing.yml的代码
admin_user_show:
path: /{id}/show
defaults: { _controller: "CMSBundle:User:show" }
methods: GET
我把它改成这个,但我得到一个错误:
fos_user_profile_show:
path: /{id}/show
defaults: { _controller: "FOSUSerBundle:Profile:show" }
methods: GET
这是我得到的错误:
The "FOSUSerBundle" (from the _controller value "FOSUSerBundle:Profile:show") does not exist or is not enabled in your kernel! Did you mean "FOSUserBundle:Profile:show"?
如何将 FOSUserBundle 包含到我的 Bundle 中? 提前谢谢!
【问题讨论】:
标签: symfony entity bundle symfony-routing