Initial commit
This commit is contained in:
26
Helper/ConfigHelper.php
Normal file
26
Helper/ConfigHelper.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace SoundPress\WHIOrders\Helper;
|
||||
|
||||
use Magento\Framework\App\Config\ScopeConfigInterface;
|
||||
use \Magento\Framework\App\Helper\AbstractHelper;
|
||||
|
||||
class ConfigHelper extends AbstractHelper
|
||||
{
|
||||
protected $scopeConfig;
|
||||
|
||||
public function __construct(ScopeConfigInterface $scopeConfig)
|
||||
{
|
||||
$this->scopeConfig = $scopeConfig;
|
||||
}
|
||||
|
||||
public function getApiToken()
|
||||
{
|
||||
return $this->scopeConfig->getValue('whiorders/api/api_token', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
|
||||
}
|
||||
|
||||
public function getBaseUrl()
|
||||
{
|
||||
return $this->scopeConfig->getValue('whiorders/api/base_url', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user