Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
License Class Reference
Inheritance diagram for License:

Public Member Functions

 __construct (LicenseModel $license)
 
 indexAction ()
 

Protected Attributes

 $license
 

Detailed Description

Definition at line 17 of file License.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( LicenseModel  $license)

Constructor

Parameters
LicenseModel$license

Definition at line 31 of file License.php.

32  {
33  $this->license = $license;
34  }

Member Function Documentation

◆ indexAction()

indexAction ( )

Displays license

Returns
ViewModel

Definition at line 41 of file License.php.

42  {
43  $contents = $this->license->getContents();
44  $view = new ViewModel;
45  if ($contents === false) {
46  $view->setTemplate('error/404');
47  $view->setVariable('message', 'Cannot find license file.');
48  } else {
49  $view->setTerminal(true);
50  $view->setVariable('license', $contents);
51  }
52  return $view;
53  }
$contents
Definition: website.php:14

Field Documentation

◆ $license

$license
protected

Definition at line 24 of file License.php.


The documentation for this class was generated from the following file: