3 namespace Drupal\Core\Installer;
5 use Drupal\Core\DrupalKernel;
8 * Extend DrupalKernel to handle force some kernel behaviors.
10 class InstallerKernel extends DrupalKernel {
15 protected function initializeContainer() {
16 // Always force a container rebuild.
17 $this->containerNeedsRebuild = TRUE;
18 $container = parent::initializeContainer();
23 * Reset the bootstrap config storage.
25 * Use this from a database driver runTasks() if the method overrides the
26 * bootstrap config storage. Normally the bootstrap config storage is not
27 * re-instantiated during a single install request. Most drivers will not
30 * @see \Drupal\Core\Database\Install\Tasks::runTasks()
32 public function resetConfigStorage() {
33 $this->configStorage = NULL;
37 * Returns the active configuration storage used during early install.
39 * This override changes the visibility so that the installer can access
40 * config storage before the container is properly built.
42 * @return \Drupal\Core\Config\StorageInterface
45 public function getConfigStorage() {
46 return parent::getConfigStorage();
52 public function getInstallProfile() {
53 global $install_state;
54 if ($install_state && empty($install_state['installation_finished'])) {
55 // If the profile has been selected return it.
56 if (isset($install_state['parameters']['profile'])) {
57 $profile = $install_state['parameters']['profile'];
64 $profile = parent::getInstallProfile();