Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Config\Model\Config\Structure\Data $structureData, \Magento\Config\Model\Config\Structure\Element\Iterator\Tab $tabIterator, \Magento\Config\Model\Config\Structure\Element\FlyweightFactory $flyweightFactory, ScopeDefiner $scopeDefiner) | |
getTabs () | |
getSectionList () | |
getElement ($path) | |
getElementByConfigPath ($path) | |
getElementByPathParts (array $pathParts) | |
getFieldPathsByAttribute ($attributeName, $attributeValue) | |
getFieldPaths () | |
Data Fields | |
const | TYPE_KEY = '_elementType' |
Protected Member Functions | |
_createEmptyElement (array $pathParts) | |
_getGroupFieldPathsByAttribute (array $fields, $parentPath, $attributeName, $attributeValue) | |
Protected Attributes | |
$_data | |
$_tabIterator | |
$_flyweightFactory | |
$_scopeDefiner | |
$_elements | |
$sectionList | |
System configuration structure.
All paths are declared in module's system.xml.
Structure path is the nested path of node ids (section, group, field).
Config path is the path which is declared in <config_path> node. If this node is not provided then config path is the same as structure path.
With the example above you can see that the field <field id="field_one_id"> has the next paths:
Also you can see that the field <field id="field_two_id"> has the next paths:
@api
Definition at line 47 of file Structure.php.
__construct | ( | \Magento\Config\Model\Config\Structure\Data | $structureData, |
\Magento\Config\Model\Config\Structure\Element\Iterator\Tab | $tabIterator, | ||
\Magento\Config\Model\Config\Structure\Element\FlyweightFactory | $flyweightFactory, | ||
ScopeDefiner | $scopeDefiner | ||
) |
\Magento\Config\Model\Config\Structure\Data | $structureData | |
\Magento\Config\Model\Config\Structure\Element\Iterator\Tab | $tabIterator | |
\Magento\Config\Model\Config\Structure\Element\FlyweightFactory | $flyweightFactory | |
ScopeDefiner | $scopeDefiner |
Definition at line 121 of file Structure.php.
|
protected |
Create empty element data
string[] | $pathParts |
Definition at line 258 of file Structure.php.
|
protected |
Find group fields with specified attribute and attribute value
array | $fields | |
string | $parentPath | |
string | $attributeName | |
mixed | $attributeValue |
Definition at line 319 of file Structure.php.
getElement | ( | $path | ) |
Find element by structure path
string | $path | The structure path |
Implements SearchInterface.
Definition at line 178 of file Structure.php.
getElementByConfigPath | ( | $path | ) |
Find element by config path
string | $path | The configuration path |
Definition at line 190 of file Structure.php.
getElementByPathParts | ( | array | $pathParts | ) |
Find element by path parts
string[] | $pathParts |
Definition at line 227 of file Structure.php.
getFieldPaths | ( | ) |
Collects config paths and their structure paths from configuration files. Returns the map of config paths and their structure paths.
All paths are declared in module's system.xml.
If <config_path> node does not exist, then config path duplicates structure path. The result of this example will be:
Definition at line 374 of file Structure.php.
getFieldPathsByAttribute | ( | $attributeName, | |
$attributeValue | |||
) |
Retrieve paths of fields that have provided attributes with provided values
string | $attributeName | |
mixed | $attributeValue |
Definition at line 281 of file Structure.php.
getSectionList | ( | ) |
Retrieve config section list
Definition at line 158 of file Structure.php.
getTabs | ( | ) |
Retrieve tab iterator
Definition at line 138 of file Structure.php.
|
protected |
Definition at line 59 of file Structure.php.
|
protected |
Definition at line 87 of file Structure.php.
|
protected |
Definition at line 73 of file Structure.php.
|
protected |
Definition at line 80 of file Structure.php.
|
protected |
Definition at line 66 of file Structure.php.
|
protected |
Definition at line 95 of file Structure.php.
const TYPE_KEY = '_elementType' |
Key that contains field type in structure array
Definition at line 52 of file Structure.php.