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
Backend
Locale
Timezone.php
Go to the documentation of this file.
1
<?php
10
namespace
Magento\Config\Model\Config\Backend\Locale
;
11
12
use
Magento\Framework\Exception\LocalizedException
;
13
18
class
Timezone
extends
\Magento\Framework\App\Config\Value
19
{
24
public
function
beforeSave
()
25
{
26
if
(!in_array($this->getValue(), \DateTimeZone::listIdentifiers(\DateTimeZone::ALL))) {
27
throw
new
LocalizedException
(
__
(
'The time zone is incorrect. Verify the time zone and try again.'
));
28
}
29
return
$this;
30
}
31
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Config\Model\Config\Backend\Locale\Timezone\beforeSave
beforeSave()
Definition:
Timezone.php:24
__
__()
Definition:
__.php:13
Magento\Config\Model\Config\Backend\Locale
Definition:
Timezone.php:10
Magento\Config\Model\Config\Backend\Locale\Timezone
Definition:
Timezone.php:18