Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Config.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Weee\Model;
7 
9 
13 class Config
14 {
18  const XML_PATH_FPT_ENABLED = 'tax/weee/enable';
19 
20  // display settings
21  const XML_PATH_FPT_DISPLAY_PRODUCT_VIEW = 'tax/weee/display';
22 
23  const XML_PATH_FPT_DISPLAY_PRODUCT_LIST = 'tax/weee/display_list';
24 
25  const XML_PATH_FPT_DISPLAY_SALES = 'tax/weee/display_sales';
26 
27  const XML_PATH_FPT_DISPLAY_EMAIL = 'tax/weee/display_email';
28 
29  // misc
30  const XML_PATH_FPT_INCLUDE_IN_SUBTOTAL = 'tax/weee/include_in_subtotal';
31 
32  const XML_PATH_FPT_TAXABLE = 'tax/weee/apply_vat';
33 
39  protected $scopeConfig;
40 
45  public function __construct(
46  \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
47  \Magento\Tax\Helper\Data $taxData
48  ) {
49  $this->taxHelper = $taxData;
50  $this->scopeConfig = $scopeConfig;
51  }
52 
59  public function getPriceDisplayType($store = null)
60  {
61  return $this->scopeConfig->getValue(
62  self::XML_PATH_FPT_DISPLAY_PRODUCT_VIEW,
64  $store
65  );
66  }
67 
74  public function getListPriceDisplayType($store = null)
75  {
76  return $this->scopeConfig->getValue(
77  self::XML_PATH_FPT_DISPLAY_PRODUCT_LIST,
79  $store
80  );
81  }
82 
89  public function getSalesPriceDisplayType($store = null)
90  {
91  return $this->scopeConfig->getValue(
92  self::XML_PATH_FPT_DISPLAY_SALES,
94  $store
95  );
96  }
97 
104  public function getEmailPriceDisplayType($store = null)
105  {
106  return $this->scopeConfig->getValue(
107  self::XML_PATH_FPT_DISPLAY_EMAIL,
109  $store
110  );
111  }
112 
119  public function includeInSubtotal($store = null)
120  {
121  return $this->scopeConfig->isSetFlag(
122  self::XML_PATH_FPT_INCLUDE_IN_SUBTOTAL,
124  $store
125  );
126  }
127 
134  public function isTaxable($store = null)
135  {
136  return $this->scopeConfig->isSetFlag(
137  self::XML_PATH_FPT_TAXABLE,
139  $store
140  );
141  }
142 
149  public function isEnabled($store = null)
150  {
151  return $this->scopeConfig->getValue(
152  self::XML_PATH_FPT_ENABLED,
154  $store
155  );
156  }
157 }
const XML_PATH_FPT_DISPLAY_PRODUCT_LIST
Definition: Config.php:23
const XML_PATH_FPT_DISPLAY_PRODUCT_VIEW
Definition: Config.php:21
isEnabled($store=null)
Definition: Config.php:149
includeInSubtotal($store=null)
Definition: Config.php:119
isTaxable($store=null)
Definition: Config.php:134
const XML_PATH_FPT_DISPLAY_SALES
Definition: Config.php:25
const XML_PATH_FPT_INCLUDE_IN_SUBTOTAL
Definition: Config.php:30
getListPriceDisplayType($store=null)
Definition: Config.php:74
__construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Tax\Helper\Data $taxData)
Definition: Config.php:45
getPriceDisplayType($store=null)
Definition: Config.php:59
getSalesPriceDisplayType($store=null)
Definition: Config.php:89
getEmailPriceDisplayType($store=null)
Definition: Config.php:104
const XML_PATH_FPT_DISPLAY_EMAIL
Definition: Config.php:27