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-page-cache
Model
System
Config
Backend
AccessList.php
Go to the documentation of this file.
1
<?php
7
declare(strict_types=1);
8
9
namespace
Magento\PageCache\Model\System\Config\Backend
;
10
11
use
Magento\Framework\Exception\LocalizedException
;
12
use
Magento\Framework\Phrase
;
13
17
class
AccessList
extends
Varnish
18
{
22
public
function
beforeSave
()
23
{
24
parent::beforeSave();
25
26
$value
= $this->getValue();
27
if
(!is_string(
$value
) || !preg_match(
'/^[\w\s\.\-\,\:]+$/'
,
$value
)) {
28
throw
new
LocalizedException
(
29
new
Phrase
(
30
'Access List value "%1" is not valid. '
31
.
'Please use only IP addresses and host names.'
,
32
[
$value
]
33
)
34
);
35
}
36
}
37
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\PageCache\Model\System\Config\Backend\AccessList
Definition:
AccessList.php:17
Magento\PageCache\Model\System\Config\Backend\Varnish
Definition:
Varnish.php:13
Magento\PageCache\Model\System\Config\Backend
Definition:
TtlTest.php:6
$value
$value
Definition:
gender.phtml:16
Magento\PageCache\Model\System\Config\Backend\AccessList\beforeSave
beforeSave()
Definition:
AccessList.php:22
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Phrase