Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DesignLoader.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Framework\View;
7 
9 {
15  protected $_request;
16 
22  protected $_areaList;
23 
29  protected $appState;
30 
36  public function __construct(
37  \Magento\Framework\App\RequestInterface $request,
38  \Magento\Framework\App\AreaList $areaList,
39  \Magento\Framework\App\State $appState
40  ) {
41  $this->_request = $request;
42  $this->_areaList = $areaList;
43  $this->appState = $appState;
44  }
45 
51  public function load()
52  {
53  $area = $this->_areaList->getArea($this->appState->getAreaCode());
54  $area->load(\Magento\Framework\App\Area::PART_DESIGN);
55  $area->load(\Magento\Framework\App\Area::PART_TRANSLATE);
56  $area->detectDesign($this->_request);
57  }
58 }
__construct(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\AreaList $areaList, \Magento\Framework\App\State $appState)