Baum\Move::perform PHP Method

perform() public method

Perform the move operation.
public perform ( ) : Node
return Node
    public function perform()
    {
        $this->guardAgainstImpossibleMove();
        if ($this->fireMoveEvent('moving') === false) {
            return $this->node;
        }
        if ($this->hasChange()) {
            $self = $this;
            $this->node->getConnection()->transaction(function () use($self) {
                $self->updateStructure();
            });
            $this->target->reload();
            $this->node->setDepthWithSubtree();
            $this->node->reload();
        }
        $this->fireMoveEvent('moved', false);
        return $this->node;
    }