Kernel::getBundle()

BundleInterface|BundleInterface[] getBundle(string $name, bool $first = true)

Returns a bundle and optionally its descendants by its name.

Parameters

string $name Bundle name
bool $first Whether to return the first bundle only or together with its descendants

Return Value

BundleInterface|BundleInterface[] A BundleInterface instance or an array of BundleInterface instances if $first is false

Exceptions

InvalidArgumentException when the bundle is not enabled
doc_Symfony
2016-10-28 06:22:04
Comments
Leave a Comment

Please login to continue.