示例#1
0
 /**
  * @return ViewModel
  */
 public function indexAction()
 {
     $view = new ViewModel([
         'timezone' => $this->list->getTimezoneList(),
         'currency' => $this->list->getCurrencyList(),
         'language' => $this->list->getLocaleList(),
         'isSampledataEnabled' => $this->sampleData->isDeployed(),
         'isSampleDataInstalled' => $this->sampleData->isInstalledSuccessfully(),
         'isSampleDataErrorInstallation' => $this->sampleData->isInstallationError()
     ]);
     $view->setTerminal(true);
     return $view;
 }
示例#2
0
 /**
  * Install Magento application
  *
  * @param \ArrayObject|array $request
  * @return void
  * @throws \LogicException
  */
 public function install($request)
 {
     $script[] = ['File permissions check...', 'checkInstallationFilePermissions', []];
     $script[] = ['Enabling Maintenance Mode...', 'setMaintenanceMode', [1]];
     $script[] = ['Installing deployment configuration...', 'installDeploymentConfig', [$request]];
     if (!empty($request[self::CLEANUP_DB])) {
         $script[] = ['Cleaning up database...', 'cleanupDb', []];
     }
     $script[] = ['Installing database schema:', 'installSchema', []];
     $script[] = ['Installing user configuration...', 'installUserConfig', [$request]];
     $script[] = ['Installing data...', 'installDataFixtures', []];
     if (!empty($request[self::SALES_ORDER_INCREMENT_PREFIX])) {
         $script[] = ['Creating sales order increment prefix...', 'installOrderIncrementPrefix', [$request[self::SALES_ORDER_INCREMENT_PREFIX]]];
     }
     $script[] = ['Installing admin user...', 'installAdminUser', [$request]];
     $script[] = ['Enabling caches:', 'enableCaches', []];
     if (!empty($request[Installer::USE_SAMPLE_DATA]) && $this->sampleData->isDeployed()) {
         $script[] = ['Installing sample data:', 'installSampleData', [$request]];
     }
     $script[] = ['Disabling Maintenance Mode:', 'setMaintenanceMode', [0]];
     $script[] = ['Post installation file permissions check...', 'checkApplicationFilePermissions', []];
     $estimatedModules = $this->createModulesConfig($request);
     $total = count($script) + 3 * count(array_filter($estimatedModules->getData()));
     $this->progress = new Installer\Progress($total, 0);
     $this->log->log('Starting Magento installation:');
     while (list(, list($message, $method, $params)) = each($script)) {
         $this->log->log($message);
         call_user_func_array([$this, $method], $params);
         $this->logProgress();
     }
     $this->log->logSuccess('Magento installation complete.');
     if ($this->progress->getCurrent() != $this->progress->getTotal()) {
         throw new \LogicException('Installation progress did not finish properly.');
     }
 }
示例#3
0
 public function testIsDeployed()
 {
     $this->directoryList->expects($this->once())->method('getPath')->with('code');
     $this->sampleDataInstall->isDeployed();
 }