public function moveDown(Model\BlockInterface $block)
    {
        $row = $block->getRow();
        if (null === $row || $row->isLast()) {
            throw new InvalidOperationException(
                "This block can't be moved to the top."
            );
        }

        $sibling = $this->editor->getRepository()->findSiblingRow($row, true);
        if (null === $sibling) {
            throw new InvalidOperationException(
                "The block can't be moved to the bottom as no sibling row has been found."
            );
        }

        $row->removeBlock($block);
        $sibling->addBlock($block);

        $this->editor
            ->getRowManager()
            ->fixBlocksPositions($row)
            ->fixBlocksPositions($sibling);

        return $sibling;
    }
public function moveDown(Model\BlockInterface $block)
    {
        $row = $block->getRow();
        if (null === $row || $row->isLast()) {
            throw new InvalidOperationException(
                "This block can't be moved to the top."
            );
        }

        $sibling = $this->editor->getRepository()->findSiblingRow($row, true);
        if (null === $sibling) {
            throw new InvalidOperationException(
                "The block can't be moved to the bottom as no sibling row has been found."
            );
        }

        $row->removeBlock($block);
        $sibling->addBlock($block);

        $this->editor
            ->getRowManager()
            ->fixBlocksPositions($row)
            ->fixBlocksPositions($sibling);

        return $sibling;
    }
public function moveDown ( Model \ BlockInterface $ block ) { $ row = $ block -> getRow ( ) ; if ( null === $ row || $ row -> isLast ( ) ) { throw new InvalidOperationException ( "This block can't be moved to the top." ) ; } $ sibling = $ this -> editor -> getRepository ( ) -> findSiblingRow ( $ row , true ) ; if ( null === $ sibling ) { throw new InvalidOperationException ( "The block can't be moved to the bottom as no sibling row has been found." ) ; } $ row -> removeBlock ( $ block ) ; $ sibling -> addBlock ( $ block ) ; $ this -> editor -> getRowManager ( ) -> fixBlocksPositions ( $ row ) -> fixBlocksPositions ( $ sibling ) ; return $ sibling ; }
Moves the block down.

@param Model\BlockInterface $block

@return Model\RowInterface The sibling row where the block has been moved into.
@throws InvalidOperationException
Moves the block down .