Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Psr\Log\LoggerInterface $logger, State $state, array $elements=null) | |
createStructuralElement ($name, $type, $class) | |
reorderChildElement ($parentName, $childName, $offsetOrSibling, $after=true) | |
Protected Member Functions | |
_generateAnonymousName ($class) | |
_filterSearchMinus ($needle, array $haystack, $isLast) | |
Protected Attributes | |
$_nameIncrement = [] | |
$logger | |
$state | |
An associative data structure, that features "nested set" parent-child relations
@api
Definition at line 17 of file Structure.php.
__construct | ( | \Psr\Log\LoggerInterface | $logger, |
State | $state, | ||
array | $elements = null |
||
) |
Constructor
\Psr\Log\LoggerInterface | $logger | |
State | $state | |
array | $elements |
Definition at line 43 of file Structure.php.
|
protected |
Search for an array element using needle, but needle may be '-', which means "first" or "last" element
Returns first or last element in the haystack, or the $needle argument
string | $needle | |
array | $haystack | |
bool | $isLast |
Definition at line 147 of file Structure.php.
|
protected |
Generate anonymous element name for structure
string | $class |
Definition at line 78 of file Structure.php.
createStructuralElement | ( | $name, | |
$type, | |||
$class | |||
) |
Register an element in structure
Will assign an "anonymous" name to the element, if provided with an empty name
string | $name | |
string | $type | |
string | $class |
Definition at line 63 of file Structure.php.
reorderChildElement | ( | $parentName, | |
$childName, | |||
$offsetOrSibling, | |||
$after = true |
|||
) |
Reorder a child of a specified element
If $offsetOrSibling is null, it will put the element to the end If $offsetOrSibling is numeric (integer) value, it will put the element after/before specified position Otherwise – after/before specified sibling
string | $parentName | |
string | $childName | |
string | int | null | $offsetOrSibling | |
bool | $after |
Definition at line 108 of file Structure.php.
|
protected |
Definition at line 24 of file Structure.php.
|
protected |
Definition at line 29 of file Structure.php.
|
protected |
Definition at line 34 of file Structure.php.