Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Kernel.php

function Kernel::getBundle

Overrides KernelInterface::getBundle

1 call to Kernel::getBundle()
Kernel::locateResource in vendor/symfony/http-kernel/Kernel.php
Returns the file path for a given bundle resource.

File

vendor/symfony/http-kernel/Kernel.php, line 201

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

public function getBundle(string $name) : BundleInterface {
    if (!isset($this->bundles[$name])) {
        throw new \InvalidArgumentException(\sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the "registerBundles()" method of your "%s.php" file?', $name, get_debug_type($this)));
    }
    return $this->bundles[$name];
}
RSS feed
Powered by Drupal