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
PathValidator.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Config\Model\Config
;
8
9
use
Magento\Framework\Exception\ValidatorException
;
10
16
class
PathValidator
17
{
23
private
$structure;
24
28
public
function
__construct
(
Structure
$structure)
29
{
30
$this->structure = $structure;
31
}
32
41
public
function
validate
(
$path
)
42
{
43
$allPaths = $this->structure->getFieldPaths();
44
45
if
(!array_key_exists(
$path
, $allPaths)) {
46
throw
new
ValidatorException
(
__
(
'The "%1" path doesn\'t exist. Verify and try again.'
,
$path
));
47
}
48
49
return
true
;
50
}
51
}
__
__()
Definition:
__.php:13
Magento\Config\Model\Config\PathValidator\validate
validate($path)
Definition:
PathValidator.php:41
Magento\Config\Model\Config\Structure
Definition:
Structure.php:47
Magento\Config\Model\Config\PathValidator\__construct
__construct(Structure $structure)
Definition:
PathValidator.php:28
Magento\Framework\Exception\ValidatorException
Definition:
ValidatorException.php:12
Magento\Config\Model\Config
Magento\Config\Model\Config\PathValidator
Definition:
PathValidator.php:16
$path
$path
Definition:
import_with_filesystem_images.php:14