Skip to content
Snippets Groups Projects
Select Git revision
  • project-update-bot-only
  • 8.x-1.x default
  • 3433816-automated-drupal-11
  • 3433816-manual-drupal-11
  • 7.x-1.x
  • previous/3433816-automated-drupal-11/2024-07-28
  • previous/project-update-bot-only/2024-06-18
  • previous/project-update-bot-only/2024-06-08
  • previous/project-update-bot-only/2024-06-02
  • previous/project-update-bot-only/2024-05-30
  • 8.x-1.17
  • 8.x-1.16
  • 8.x-1.15
  • 8.x-1.14
  • 8.x-1.13
  • 8.x-1.12
  • 8.x-1.11
  • 8.x-1.10
  • 8.x-1.9
  • 8.x-1.8
  • 8.x-1.7
  • 8.x-1.6
  • 8.x-1.5
  • 8.x-1.4
  • 8.x-1.3
25 results

ParagraphsBehaviorBase.php

Blame
  • Forked from project / paragraphs
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    CoreBundle.php 5.72 KiB
    <?php
    
    /**
     * @file
     * Definition of Drupal\Core\CoreBundle.
     */
    
    namespace Drupal\Core;
    
    use Drupal\Core\Cache\ListCacheBinsPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterKernelListenersPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterMatchersPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterPathProcessorsPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterRouteFiltersPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterRouteEnhancersPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterParamConvertersPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterServicesForDestructionPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterStringTranslatorsPass;
    use Drupal\Core\DependencyInjection\Compiler\RegisterBreadcrumbBuilderPass;
    use Symfony\Component\DependencyInjection\ContainerBuilder;
    use Symfony\Component\DependencyInjection\ContainerInterface;
    use Symfony\Component\DependencyInjection\Reference;
    use Symfony\Component\DependencyInjection\Definition;
    use Symfony\Component\DependencyInjection\Scope;
    use Symfony\Component\HttpKernel\Bundle\Bundle;
    use Symfony\Component\DependencyInjection\Compiler\PassConfig;
    
    /**
     * Bundle class for mandatory core services.
     *
     * This is where Drupal core registers all of its compiler passes.
     * The service definitions themselves are in core/core.services.yml with a
     * few, documented exceptions (typically, install requirements).
     *
     * Modules wishing to register services to the container should use
     * modulename.services.yml in their respective directories.
     */
    class CoreBundle extends Bundle {
    
      /**
       * Implements \Symfony\Component\HttpKernel\Bundle\BundleInterface::build().
       */
      public function build(ContainerBuilder $container) {
        // The 'request' scope and service enable services to depend on the Request
        // object and get reconstructed when the request object changes (e.g.,
        // during a subrequest).
        $container->addScope(new Scope('request'));
        $this->registerTwig($container);
        $this->registerModuleHandler($container);
    
        $container->addCompilerPass(new RegisterMatchersPass());
        $container->addCompilerPass(new RegisterRouteFiltersPass());
        // Add a compiler pass for registering event subscribers.
        $container->addCompilerPass(new RegisterKernelListenersPass(), PassConfig::TYPE_AFTER_REMOVING);
        $container->addCompilerPass(new RegisterAccessChecksPass());
        // Add a compiler pass for upcasting of entity route parameters.
        $container->addCompilerPass(new RegisterParamConvertersPass());
        $container->addCompilerPass(new RegisterRouteEnhancersPass());
        // Add a compiler pass for registering services needing destruction.
        $container->addCompilerPass(new RegisterServicesForDestructionPass());
        // Add the compiler pass that will process the tagged services.
        $container->addCompilerPass(new RegisterPathProcessorsPass());
        $container->addCompilerPass(new ListCacheBinsPass());
        // Add the compiler pass for appending string translators.
        $container->addCompilerPass(new RegisterStringTranslatorsPass());
        // Add the compiler pass that will process the tagged breadcrumb builder
        // services.
        $container->addCompilerPass(new RegisterBreadcrumbBuilderPass());
      }