1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Setup\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
/**
* Controller for Setup Landing page
*/
class LandingInstaller extends AbstractActionController
{
/**
* @var \Magento\Framework\App\ProductMetadata
*/
protected $productMetadata;
/**
* @param \Magento\Framework\App\ProductMetadata $productMetadata
*/
public function __construct(\Magento\Framework\App\ProductMetadata $productMetadata)
{
$this->productMetadata = $productMetadata;
}
/**
* Setup index action.
*
* @return array|ViewModel
*/
public function indexAction()
{
$welcomeMsg = "Welcome to Magento Admin, your online store headquarters.<br>"
. "Click 'Agree and Set Up Magento' or read ";
$docRef = "https://devdocs.magento.com/guides/v1.0/install-gde/install/install-web.html";
$agreeButtonText = "Agree and Setup Magento";
$view = new ViewModel;
$view->setTerminal(true);
$view->setTemplate('/magento/setup/landing.phtml');
$view->setVariable('version', $this->productMetadata->getVersion());
$view->setVariable('welcomeMsg', $welcomeMsg);
$view->setVariable('docRef', $docRef);
$view->setVariable('agreeButtonText', $agreeButtonText);
return $view;
}
}