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
YourBundle::yourStaticFunction();
$this->container->getParameter('kernel.bundles')
to get the list of bundles. This only returns the bundle class names instead of the Bundle object. Go through each bundle, check if the bundle has the function yourStaticFunction()
, Hint: Use method_exists()
. If the method exists, then call ::yourStaticFunction();