magento2-docker/app/code/IpSupply/SyncOrder/Config/GetBaseURL.php

24 lines
571 B
PHP
Executable File

<?php
namespace IpSupply\SyncOrder\Config;
use Magento\Store\Model\StoreManagerInterface;
class GetBaseURL
{
protected $storeManagerInterface;
static function get()
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
return $storeManager->getStore()->getBaseUrl();
}
public function __construct(StoreManagerInterface $storeManagerInterface)
{
$this->storeManagerInterface = $storeManagerInterface;
}
}