How do I get a list of bundles in symfony2/symfony3?

前端 未结 5 858
被撕碎了的回忆
被撕碎了的回忆 2021-02-02 12:14

I\'ve just started using symfony and I\'d like to get a list of bundles from a particular vendor, iterate through them and call a $bundle->renderSomething() function on each def

5条回答
  •  别跟我提以往
    2021-02-02 12:48

    If you have container object available then you can get array of the enabled bundles by $this->container->getParameter('kernel.bundles');

提交回复
热议问题