How to get base URL , media URL and link URL via object manager ?

How to get base URL , media URL and link URL via object manager ?

$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$storeManager = $_objectManager->get('Magento\Store\Model\StoreManagerInterface');

$currentStore = $storeManager->getStore();

$baseUrl = $currentStore->getBaseUrl();

$mediaUrl = $currentStore->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);

$linkUrl = $currentStore->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LINK);



Copyright © 2024 Tridhya Tech Limited, Inc. All rights reserved.