代码之家  ›  专栏  ›  技术社区  ›  Leo

如何生成FOS UserBundle视图

  •  -1
  • Leo  · 技术社区  · 11 年前

    我使用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目录。。。

    2 回复  |  直到 11 年前
        1
  •  0
  •   FyodorX    11 年前

    您可以在 vendor 目录

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

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

        2
  •  0
  •   Aref Ben Lazrek    8 年前

    覆盖模板有充分的文档记录 here

    推荐文章