protected function setupDatabaseFromRestore(
        $method = null,
        $localhost = false
    ) {
        /** @var EngineType $engine */
        $engine = $this->getEngineInstance();

        if ($engine instanceof DockerEngineType) {
            $options = $this->databaseRestoreOptions();

            if (!isset($method)
                || !in_array($method, $options)) {
                $method = $this->doAsk(new ChoiceQuestion(
                    'Setup the project using? ',
                    $options
                ));
            }
            switch ($method) {
                case 'site-config':
                    $this
                        ->setupDrupalInstall($localhost)
                        ->setDrupalUuid($localhost)
                        ->importDrupalConfig(1, $localhost);
                    break;
                case 'database-import':
                    $this->importDatabaseToService($this->getPhpServiceName(), null, true, $localhost);
                    break;
                default:
                    /** @var DrupalPlatformRestoreInterface $platform */
                    $platform = $this->getPlatformInstance();

                    if ($platform instanceof DrupalPlatformRestoreInterface) {
                        $platform->drupalRestore($method);
                    }
            }
            $this->clearDrupalCache($localhost);
        } else {
            $classname = get_class($engine);

            throw new \RuntimeException(
                sprintf("The engine type %s isn't supported", $classname::getLabel())
            );
        }

        return $this;
    }