Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-directory
Model
TopDestinationCountries.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Directory\Model
;
8
9
use
Magento\Store\Model\ScopeInterface
;
10
use
Magento\Framework\App\Config\ScopeConfigInterface
;
11
15
class
TopDestinationCountries
16
{
17
const
CONFIG_DESTINATIONS_PATH
=
'general/country/destinations'
;
18
22
private
$scopeConfig;
23
27
public
function
__construct
(
ScopeConfigInterface
$scopeConfig)
28
{
29
$this->scopeConfig = $scopeConfig;
30
}
31
37
public
function
getTopDestinations
()
38
{
39
$destinations = (string)$this->scopeConfig->getValue(
40
self::CONFIG_DESTINATIONS_PATH,
41
ScopeInterface::SCOPE_STORE
42
);
43
return
!empty($destinations) ? explode(
','
, $destinations) : [];
44
}
45
}
Magento\Directory\Model\TopDestinationCountries\getTopDestinations
getTopDestinations()
Definition:
TopDestinationCountries.php:37
Magento\Directory\Model\TopDestinationCountries
Definition:
TopDestinationCountries.php:15
Magento\Store\Model\ScopeInterface
Definition:
ScopeInterface.php:12
Magento\Directory\Model\TopDestinationCountries\CONFIG_DESTINATIONS_PATH
const CONFIG_DESTINATIONS_PATH
Definition:
TopDestinationCountries.php:17
Magento\Directory\Model\TopDestinationCountries\__construct
__construct(ScopeConfigInterface $scopeConfig)
Definition:
TopDestinationCountries.php:27
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15
Magento\Directory\Model