【问题标题】:How to generate FOS UserBundle views如何生成 FOS UserBundle 视图
【发布时间】:2014-09-06 15:46:13
【问题描述】:

我正在使用 FOS 用户包来允许用户注册和登录我的应用程序。到目前为止,它工作得很好,但我不知道如何获得这些观点?我可以以某种方式生成它们吗? Documentation 似乎对此一无所知,只是覆盖模板,这不是我需要的......

起初我认为路由文件可能有一些用处,因为它指向项目中的特定位置,但它列出了我什至在我的应用程序中没有的文件夹

fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"

fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /profile

fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /register

fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /resetting

fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /profile

根本没有FOSUserBundle目录...

【问题讨论】:

  • 太好了,将其作为答案发布,如果您愿意,我会将其标记为已接受

标签: php symfony fosuserbundle


【解决方案1】:

您可以在vendor 目录中找到安装的第三方包。

在这种情况下,@FOSUserBundle 应该是指向vendor/friendsofsymfony/user-bundle/FOS/UserBundle/ 的指针。

如果您没有该目录,请尝试在您的项目根目录上运行它:composer update

【讨论】:

    【解决方案2】:

    覆盖模板有据可查here

    【讨论】:

      猜你喜欢
      • 2013-09-15
      • 2013-11-05
      • 1970-01-01
      • 2015-12-05
      • 2016-07-22
      • 2014-07-24
      • 2013-06-28
      • 2014-10-16
      • 1970-01-01
      相关资源
      最近更新 更多