public function Kernel::isClassInActiveBundle

Checks if a given class name belongs to an active bundle.

@api

Parameters

string $class A class name:

Return value

Boolean true if the class belongs to an active bundle, false otherwise

Overrides KernelInterface::isClassInActiveBundle

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php, line 227

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

public function isClassInActiveBundle($class) {
  foreach ($this
    ->getBundles() as $bundle) {
    if (0 === strpos($class, $bundle
      ->getNamespace())) {
      return true;
    }
  }
  return false;
}