_objectManager = ObjectManager::getInstance(); $this->_storeManager = $_storeManager; parent::__construct($context, $data); } function getAssetUrl($asset) { $assetRepository = $this->_objectManager->get('Magento\Framework\View\Asset\Repository'); return $assetRepository->createAsset($asset)->getUrl(); } function getBaseUrl() { $storeManager = $this->_objectManager->get('\Magento\Store\Model\StoreManagerInterface'); $baseUrl = $storeManager->getStore()->getBaseUrl(); return $baseUrl; } function getCustomerInfo() { $customerSession = $this->_objectManager->create('Magento\Customer\Model\Session'); if ($customerSession->isLoggedIn()) { return ["logged" => True]; } return ["logged" => False]; } }