树枝中的symfony 3渲染控制器
symfony 3 render controller in twig
在树枝模板中
{{ render(controller('FOSUserBundle:SecurityController:login',{})) }}
错误:
An exception has been thrown during the rendering of a template ("The
_controller value "FOSUserBundle:SecurityController:login" maps to a "FOS\UserBundle\Controller\SecurityControllerController" class, but
this class was not found. Create this class or check the spelling of
the class and its namespace.")
如何在 twig 模板中声明使用命名空间?谢谢
从渲染中移除 'controller',像这样:
{{ render(controller('FOSUserBundle:Security:login',{})) }}
在树枝模板中
{{ render(controller('FOSUserBundle:SecurityController:login',{})) }}
错误:
An exception has been thrown during the rendering of a template ("The _controller value "FOSUserBundle:SecurityController:login" maps to a "FOS\UserBundle\Controller\SecurityControllerController" class, but this class was not found. Create this class or check the spelling of the class and its namespace.")
如何在 twig 模板中声明使用命名空间?谢谢
从渲染中移除 'controller',像这样:
{{ render(controller('FOSUserBundle:Security:login',{})) }}