protected function compileContainer() { // We are forcing a container build so it is reasonable to assume that the
// calling method knows something about the system has changed requiring the
// container to be dumped to the filesystem.
if ($this->allowDumping
) { $this->containerNeedsDumping = TRUE;
} $this->
initializeServiceProviders();
$container =
$this->
getContainerBuilder();
$container->
set('kernel',
$this);
$container->
setParameter('container.modules',
$this->
getModulesParameter());
$container->
setParameter('install_profile',
$this->
getInstallProfile());
// Get a list of namespaces and put it onto the container.
$namespaces =
$this->
getModuleNamespacesPsr4($this->
getModuleFileNames());
// Add all components in \Drupal\Core and \Drupal\Component that have one of
// the following directories:
// - Element
// - Entity
// - Plugin
foreach (['Core', 'Component'
] as $parent_directory) { $path = 'core/lib/Drupal/' .
$parent_directory;