getCachedContainerDefinition example

// If we haven't booted yet but there is a container, then we're asked to     // boot the container injected via setContainer().     // @see \Drupal\KernelTests\KernelTestBase::setUp()     if (isset($this->container) && !$this->booted) {
      $container = $this->container;
    }

    // If the module list hasn't already been set in updateModules and we are     // not forcing a rebuild, then try and load the container from the cache.     if (empty($this->moduleList) && !$this->containerNeedsRebuild) {
      $container_definition = $this->getCachedContainerDefinition();
    }

    // If there is no container and no cached container definition, build a new     // one from scratch.     if (!isset($container) && !isset($container_definition)) {
      $container = $this->compileContainer();

      // Only dump the container if dumping is allowed. This is useful for       // KernelTestBase, which never wants to use the real container, but always       // the container builder.       if ($this->allowDumping) {
        
Home | Imprint | This part of the site doesn't use cookies.