protected function __positionedBefore($elements, $value) { $value = $this->_getBlock($value); if (!$value) { return $elements; } $index = $this->_indexOfRootBlock($elements, $value); if ($index <= 0) { return []; } return array_slice($elements, 0, $index); }