install_drupal example

// Initialize the autoloader. $class_loader = require_once $root_path . '/autoload.php';

// If OPCache is in use, ensure opcache.save_comments is enabled. if (OpCodeCache::isEnabled() && !ini_get('opcache.save_comments')) {
  print 'Systems with OPcache installed must have <a href="http://php.net/manual/opcache.configuration.php#ini.opcache.save-comments">opcache.save_comments</a> enabled.';
  exit();
}

// Start the installer. require_once $root_path . '/core/includes/install.core.inc';
install_drupal($class_loader);
/** * Execute the non-interactive installer. * * @see install_drupal() */
  protected function doInstall() {
    require_once DRUPAL_ROOT . '/core/includes/install.core.inc';
    $parameters = $this->installParameters();
    // Simulate a real install which does not start with the any connections set     // in \Drupal\Core\Database\Database::$connections.     Database::removeConnection('default');
    install_drupal($this->classLoader, $parameters);
  }

  /** * Initialize settings created during install. */
  protected function initSettings() {
    Settings::initialize(DRUPAL_ROOT, $this->siteDirectory, $this->classLoader);

    // After writing settings.php, the installer removes write permissions     // from the site directory. To allow drupal_generate_test_ua() to write     // a file containing the private key for drupal_valid_test_ua(), the site
if ($io->isVerbose()) {
        $io->writeln("Creating file: {$site_path}/settings.php");
      }
      if (!copy('sites/default/default.settings.php', "{$site_path}/settings.php")) {
        throw new \RuntimeException("Copying sites/default/default.settings.php to {$site_path}/settings.php failed.");
      }
    }

    require_once 'core/includes/install.core.inc';

    $progress_bar = $io->createProgressBar();
    install_drupal($class_loader$parametersfunction D$install_state) use ($progress_bar) {
      static $started = FALSE;
      if (!$started) {
        $started = TRUE;
        // We've already done 1.         $progress_bar->setFormat("%current%/%max% [%bar%]\n%message%\n");
        $progress_bar->setMessage(t('Installing @drupal', ['@drupal' => drupal_install_profile_distribution_name()]));
        $tasks = install_tasks($install_state);
        $progress_bar->start(count($tasks) + 1);
      }
      $tasks_to_perform = install_tasks_to_perform($install_state);
      $task = current($tasks_to_perform);
      
Home | Imprint | This part of the site doesn't use cookies.