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-config
Model
Config
Source
Locale
Timezone.php
Go to the documentation of this file.
1
<?php
10
namespace
Magento\Config\Model\Config\Source\Locale
;
11
16
class
Timezone
implements
\Magento\Framework\Option\ArrayInterface
17
{
21
protected
$ignoredTimezones
= [
22
'Antarctica/Troll'
,
23
'Asia/Chita'
,
24
'Asia/Srednekolymsk'
,
25
'Pacific/Bougainville'
26
];
27
31
protected
$_localeLists
;
32
36
public
function
__construct
(\
Magento
\Framework\
Locale
\ListsInterface $localeLists)
37
{
38
$this->_localeLists = $localeLists;
39
}
40
44
public
function
toOptionArray
()
45
{
46
$timezones = $this->_localeLists->getOptionTimezones();
47
$timezones = array_filter($timezones,
function
(
$value
) {
48
if
(in_array(
$value
[
'value'
], $this->ignoredTimezones)) {
49
return
false
;
50
}
51
return
true
;
52
});
53
54
return
$timezones;
55
}
56
}
Magento\Config\Model\Config\Source\Locale\Timezone\toOptionArray
toOptionArray()
Definition:
Timezone.php:44
Magento\Config\Model\Config\Source\Locale\Timezone\$_localeLists
$_localeLists
Definition:
Timezone.php:31
Magento\Config\Model\Config\Source\Locale\Timezone
Definition:
Timezone.php:16
Magento\Framework\Option\ArrayInterface
Definition:
ArrayInterface.php:11
Magento\Config\Model\Config\Source\Locale
Definition:
Locale.php:16
$value
$value
Definition:
gender.phtml:16
Magento
Magento\Config\Model\Config\Source\Locale\Timezone\$ignoredTimezones
$ignoredTimezones
Definition:
Timezone.php:21
Magento\Config\Model\Config\Source\Locale\Timezone\__construct
__construct(\Magento\Framework\Locale\ListsInterface $localeLists)
Definition:
Timezone.php:36
Magento\Config\Model\Config\Source\Locale
Definition:
Country.php:10