Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ScopeDefiner.php
Go to the documentation of this file.
1 <?php
7 
9 use Magento\Store\Model\ScopeInterface as StoreScopeInterface;
10 
17 {
23  protected $_request;
24 
28  public function __construct(\Magento\Framework\App\RequestInterface $request)
29  {
30  $this->_request = $request;
31  }
32 
38  public function getScope()
39  {
40  return $this->_request->getParam(
41  'store'
42  ) ? StoreScopeInterface::SCOPE_STORE : ($this->_request->getParam(
43  'website'
44  ) ? StoreScopeInterface::SCOPE_WEBSITE : ScopeConfigInterface::SCOPE_TYPE_DEFAULT);
45  }
46 }
__construct(\Magento\Framework\App\RequestInterface $request)