public function KernelInterface::getBundle

Returns a bundle and optionally its descendants by its name.

@api

Parameters

string $name Bundle name:

Boolean $first Whether to return the first bundle only or together with its descendants:

Return value

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

Throws

\InvalidArgumentException when the bundle is not enabled

1 method overrides KernelInterface::getBundle()
Kernel::getBundle in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
Returns a bundle and optionally its descendants by its name.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php, line 96

Class

KernelInterface
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

public function getBundle($name, $first = true);