46 array $elements =
null 50 parent::__construct($elements);
68 $this->createElement(
$name, [
'type' =>
$type]);
80 $position = strpos(
$class,
'\\Block\\');
81 $key = $position !==
false ? substr(
$class, $position + 7) :
$class;
82 $key = strtolower(trim($key,
'_'));
84 if (!isset($this->_nameIncrement[$key])) {
85 $this->_nameIncrement[$key] = 0;
89 $name = $key .
'_' . $this->_nameIncrement[$key]++;
110 if (is_numeric($offsetOrSibling)) {
111 $offset = (int)abs($offsetOrSibling) * ($after ? 1 : -1);
113 }
elseif (
null === $offsetOrSibling) {
116 $children = array_keys($this->getChildren($parentName));
117 if ($this->getChildId($parentName, $offsetOrSibling) !==
false) {
118 $offsetOrSibling = $this->getChildId($parentName, $offsetOrSibling);
121 if ($childName !== $sibling) {
122 $siblingParentName = $this->getParentId($sibling);
123 if ($parentName !== $siblingParentName) {
126 "Broken reference: the '{$childName}' tries to reorder itself towards '{$sibling}', but " .
127 "their parents are different: '{$parentName}' and '{$siblingParentName}' respectively." 132 $this->reorderToSibling($parentName, $childName, $sibling, $after ? 1 : -1);
149 if (
'-' === $needle) {
151 return array_pop($haystack);
153 return array_shift($haystack);
createStructuralElement($name, $type, $class)
_filterSearchMinus($needle, array $haystack, $isLast)
elseif(isset( $params[ 'redirect_parent']))
$_option $_optionId $class
reorderChild($parentName, $childName, $offsetOrSibling, $after=true)
_generateAnonymousName($class)
__construct(\Psr\Log\LoggerInterface $logger, State $state, array $elements=null)
reorderChildElement($parentName, $childName, $offsetOrSibling, $after=true)
if(!isset($_GET['name'])) $name