daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $this->_storeManager->getStore()->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_WEB)
  2.    
  3. namespace VendorModuleBlock;
  4.  
  5. use MagentoFrameworkViewElementTemplate;
  6. use MagentoFrameworkViewElementTemplateContext;
  7. //use VendorModuleModelFidoServiceFactory;
  8. use MagentoCustomerModelSession;
  9.  
  10. class Register extends Template
  11. {
  12.     private $fidoCallerFactory;
  13.     private $session;
  14.     // public function __construct(Context $context, FidoServiceFactory $fidoServiceFactory, Session $session) {
  15.     //     parent::__construct($context, []);
  16.     //     $this->fidoServiceFactory = $fidoServiceFactory;
  17.     //     $this->session = $session;
  18.     // }
  19.     //
  20.     // #Returns the base URL of currently visited store.
  21.     public function getBaseUrl() {
  22.     //  console.log($this->_storeManager->getStore()->getBaseUrl());
  23.     $objectManager = MagentoFrameworkAppObjectManager::getInstance();
  24.     $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
  25.         return $this->_storeManager->getStore()->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_LINK);
  26.       //return "http://127.0.0.1";
  27.  
  28.     }
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. OK, I Understand
 
Top