Symfony Kernel inside a Drupal site
Embed a Symfony Kernel in your Drupal application. When a site visitor requests a Symfony route, the kernel handles the request inside a Drupal page callback., (*1)
Normal page delivery can be short circuited entirely so that the Symfony response
is always sent, but the normal arrangement is that HTML responses are embedded inside
Drupal pages as the $content
variable in page.tpl.php
. Non-HTML responses are sent
directly to the user., (*2)
Implement hook_kernel_info()
and name your Symfony kernel app
(only one is supported)., (*3)
The kernel class must be autoloadable (unlike in Symfony's front controllers which include it). Put it in a module's info file., (*4)
name = My awesome Symfony application core = 7.x dependencies[] = kernel files[] = app/AppKernel.php
The app
and src
directories in this module are a starting point for your own project., (*5)
Use drush app
to use your Symfony kernel's console commands., (*6)
, (*7)
, (*8)