DrupalKernelInterface
interface DrupalKernelInterface implements HttpKernelInterface, ContainerAwareInterface (View source)
The interface for DrupalKernel, the core of Drupal.
This interface extends Symfony's KernelInterface and adds methods for responding to modules being enabled or disabled during its lifetime.
Constants
| CONTAINER_INITIALIZE_SUBREQUEST_FINISHED |
Event fired when the service container finished initializing in subrequest. This event allows you to initialize overrides such as language to the services. |
Methods
Boots the current kernel.
Shuts down the kernel.
Discovers available serviceProviders.
Returns all registered service providers.
Gets the current container.
Returns the cached container definition - if any.
Set the current site path.
Get the site path.
Gets the app root.
Updates the kernel's list of modules to the new list.
Force a container rebuild.
Invalidate the service container for the next request.
Helper method that does request related initialization.
Helper method that loads legacy Drupal include files.
Details
$this
boot()
Boots the current kernel.
shutdown()
Shuts down the kernel.
array
discoverServiceProviders()
Discovers available serviceProviders.
array
getServiceProviders(string $origin)
Returns all registered service providers.
ContainerInterface
getContainer()
Gets the current container.
array|null
getCachedContainerDefinition()
Returns the cached container definition - if any.
This also allows inspecting a built container for debugging purposes.
setSitePath(string $path)
Set the current site path.
string
getSitePath()
Get the site path.
string
getAppRoot()
Gets the app root.
updateModules(array $module_list, array $module_filenames = [])
Updates the kernel's list of modules to the new list.
The kernel needs to update its bundle list and container to match the new list.
ContainerInterface
rebuildContainer()
Force a container rebuild.
invalidateContainer()
Invalidate the service container for the next request.
preHandle(Request $request)
Helper method that does request related initialization.
loadLegacyIncludes()
Helper method that loads legacy Drupal include files.