Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Success.php
Go to the documentation of this file.
1 <?php
7 
10 use Zend\Mvc\Controller\AbstractActionController;
11 use Zend\View\Model\ViewModel;
12 
13 class Success extends AbstractActionController
14 {
18  protected $moduleList;
19 
24 
30  {
31  $this->moduleList = $moduleList;
32  $this->objectManagerProvider = $objectManagerProvider;
33  }
34 
38  public function indexAction()
39  {
40  if ($this->moduleList->has('Magento_SampleData')) {
42  $sampleData = $this->objectManagerProvider->get()->get(\Magento\Framework\Setup\SampleData\State::class);
43  $isSampleDataErrorInstallation = $sampleData->hasError();
44  } else {
45  $isSampleDataErrorInstallation = false;
46  }
47  $view = new ViewModel([
48  'isSampleDataErrorInstallation' => $isSampleDataErrorInstallation
49  ]);
50  $view->setTerminal(true);
51  return $view;
52  }
53 }
__construct(ModuleList $moduleList, ObjectManagerProvider $objectManagerProvider)
Definition: Success.php:29