DrupalKernel::getCachedContainerDefinition

public DrupalKernel::getCachedContainerDefinition()

Returns the cached container definition - if any.

This also allows inspecting a built container for debugging purposes.

Return value

array|null The cached container definition or NULL if not found in cache.

Overrides DrupalKernelInterface::getCachedContainerDefinition

File

core/lib/Drupal/Core/DrupalKernel.php, line 507

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

1
2
3
4
5
6
7
8
9
public function getCachedContainerDefinition() {
  $cache = $this->bootstrapContainer->get('cache.container')->get($this->getContainerCacheKey());
 
  if ($cache) {
    return $cache->data;
  }
 
  return NULL;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.