简体   繁体   中英

symfony 3 render controller in twig

in twig template

{{ render(controller('FOSUserBundle:SecurityController:login',{})) }}

THE ERROR :

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.")

how declare use namespace in twig template ? Thanks

从渲染中删除“控制器”,如下所示:

{{ render(controller('FOSUserBundle:Security:login',{})) }}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM