SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $this->_storeManager->getStore()->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_WEB)
- namespace VendorModuleBlock;
- use MagentoFrameworkViewElementTemplate;
- use MagentoFrameworkViewElementTemplateContext;
- //use VendorModuleModelFidoServiceFactory;
- use MagentoCustomerModelSession;
- class Register extends Template
- {
- private $fidoCallerFactory;
- private $session;
- // public function __construct(Context $context, FidoServiceFactory $fidoServiceFactory, Session $session) {
- // parent::__construct($context, []);
- // $this->fidoServiceFactory = $fidoServiceFactory;
- // $this->session = $session;
- // }
- //
- // #Returns the base URL of currently visited store.
- public function getBaseUrl() {
- // console.log($this->_storeManager->getStore()->getBaseUrl());
- $objectManager = MagentoFrameworkAppObjectManager::getInstance();
- $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
- return $this->_storeManager->getStore()->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_LINK);
- //return "http://127.0.0.1";
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.