dongyinshua9996 2018-02-08 10:13
浏览 21
已采纳

找出Symfony路线的定义位置?

I am working with a project that uses the Sonata Page Bundle.

After grepping all of my php files and settings files for the name of a route, I eventually found that it was being stored in the database, in a table called page__page.

My question is this: Is there an easy way to find out where a matched route is defined? Using the "profiler token" link on Symfony's debugging toolbar, I am at least able to get the name of the route, which is somewhat helpful. Unfortunately, that's where the default functionality appears to end.

  • 写回答

1条回答 默认 最新

  • duanmei1922 2018-02-08 10:41
    关注

    You have a lot of ways to create and register routes.

    The more complex are the CMF and the custom loading.

    Symfony don't track which route is defined where and when. It only tracks the compiler_class used. You can display it by using

    bin/console debug:router page__page
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用verilog实现tanh函数和softplus函数
  • ¥15 Hadoop集群部署启动Hadoop时碰到问题
  • ¥15 求京东批量付款能替代天诚
  • ¥15 slaris 系统断电后,重新开机后一直自动重启
  • ¥15 QTableWidget重绘程序崩溃
  • ¥15 谁能帮我看看这拒稿理由啥意思啊阿啊
  • ¥15 关于vue2中methods使用call修改this指向的问题
  • ¥15 idea自动补全键位冲突
  • ¥15 请教一下写代码,代码好难
  • ¥15 iis10中如何阻止别人网站重定向到我的网站