public function fixBlocksPositions(Model\RowInterface $row)
    {
        $this->sortChildrenByPosition($row, 'blocks');

        /** @var Model\BlockInterface[] $blocks */
        $blocks = $row->getBlocks();

        $position = 0;
        foreach ($blocks as $block) {
            $block->setPosition($position);
            $position++;
        }

        return $this;
    }
public function fixBlocksPositions(Model\RowInterface $row)
    {
        $this->sortChildrenByPosition($row, 'blocks');

        /** @var Model\BlockInterface[] $blocks */
        $blocks = $row->getBlocks();

        $position = 0;
        foreach ($blocks as $block) {
            $block->setPosition($position);
            $position++;
        }

        return $this;
    }
public function fixBlocksPositions ( Model \ RowInterface $ row ) { $ this -> sortChildrenByPosition ( $ row , 'blocks' ) ; /** @var Model\BlockInterface[] $blocks */ $ blocks = $ row -> getBlocks ( ) ; $ position = 0 ; foreach ( $ blocks as $ block ) { $ block -> setPosition ( $ position ) ; $ position ++ ; } return $ this ; }
Fix the blocks positions.

@param Model\RowInterface $row

@return RowManager
Fix the blocks positions .