Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
2 /***
3  * Copyright © Magento, Inc. All rights reserved.
4  * See COPYING.txt for license details.
5  */
7 
14 {
18  private $pageConfig;
19 
23  private $pageFactory;
24 
30  public function __construct(
31  \Magento\Framework\App\Action\Context $context,
32  \Magento\Framework\View\Page\Config $pageConfig,
33  \Magento\Framework\View\Result\PageFactory $pageFactory
34  ) {
35  parent::__construct($context);
36  $this->pageConfig = $pageConfig;
37  $this->pageFactory = $pageFactory;
38  }
39 
43  public function execute()
44  {
45  $this->pageConfig->addBodyClass('swagger-section');
46  return $this->pageFactory->create();
47  }
48 }
__construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Page\Config $pageConfig, \Magento\Framework\View\Result\PageFactory $pageFactory)
Definition: Index.php:30