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

Breadcrumb

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

class AbstractBundle

A Bundle that provides configuration hooks.

@author Yonel Ceruto <yonelceruto@gmail.com>

Hierarchy

  • class \Symfony\Component\HttpKernel\Bundle\Bundle implements \Symfony\Component\HttpKernel\Bundle\BundleInterface
    • class \Symfony\Component\HttpKernel\Bundle\AbstractBundle extends \Symfony\Component\HttpKernel\Bundle\Bundle implements \Symfony\Component\DependencyInjection\Extension\ConfigurableExtensionInterface

Expanded class hierarchy of AbstractBundle

File

vendor/symfony/http-kernel/Bundle/AbstractBundle.php, line 26

Namespace

Symfony\Component\HttpKernel\Bundle
View source
abstract class AbstractBundle extends Bundle implements ConfigurableExtensionInterface {
    protected string $extensionAlias = '';
    public function configure(DefinitionConfigurator $definition) : void {
    }
    public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder) : void {
    }
    public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder) : void {
    }
    public function getContainerExtension() : ?ExtensionInterface {
        if ('' === $this->extensionAlias) {
            $this->extensionAlias = Container::underscore(preg_replace('/Bundle$/', '', $this->getName()));
        }
        return $this->extension ??= new BundleExtension($this, $this->extensionAlias);
    }
    public function getPath() : string {
        if (!isset($this->path)) {
            $reflected = new \ReflectionObject($this);
            // assume the modern directory structure by default
            $this->path = \dirname($reflected->getFileName(), 2);
        }
        return $this->path;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
AbstractBundle::$extensionAlias protected property
AbstractBundle::configure public function
AbstractBundle::getContainerExtension public function Returns the bundle&#039;s container extension. Overrides Bundle::getContainerExtension
AbstractBundle::getPath public function Gets the Bundle directory path. Overrides Bundle::getPath
AbstractBundle::loadExtension public function Loads a specific configuration. Overrides ConfigurableExtensionInterface::loadExtension
AbstractBundle::prependExtension public function Allows an extension to prepend the extension configurations. Overrides ConfigurableExtensionInterface::prependExtension
Bundle::$container protected property
Bundle::$extension protected property
Bundle::$name protected property
Bundle::$namespace private property
Bundle::$path protected property
Bundle::boot public function Overrides BundleInterface::boot
Bundle::build public function This method can be overridden to register compilation passes,
other extensions, ...
Overrides BundleInterface::build
Bundle::createContainerExtension protected function Creates the bundle&#039;s container extension.
Bundle::getContainerExtensionClass protected function Returns the bundle&#039;s container extension class.
Bundle::getName final public function Returns the bundle name (the class short name). Overrides BundleInterface::getName
Bundle::getNamespace public function Gets the Bundle namespace. Overrides BundleInterface::getNamespace
Bundle::parseClassName private function
Bundle::registerCommands public function
Bundle::setContainer public function Overrides BundleInterface::setContainer
Bundle::shutdown public function Overrides BundleInterface::shutdown
RSS feed
Powered by Drupal