public function updateValues($first, $last, $delta, $oldRoot=null, $newRoot=null)
    {
        if(!$this->wrappers)
        {
            return;
        }

        $hasManyRoots = $this->getConfiguration()->hasManyRoots();

        foreach($this->wrappers as $wrapper)
        {
            if(!$hasManyRoots || ($wrapper->getRootValue() == $oldRoot))
            {
                if($wrapper->getLeftValue() >= $first && ($last === 0 || $wrapper->getRightValue() <= $last))
                {
                    if($delta !== 0)
                    {
                        $wrapper->setLeftValue($wrapper->getLeftValue() + $delta);
                        $wrapper->setRightValue($wrapper->getRightValue() + $delta);
                    }
                    if($hasManyRoots && $newRoot !== null)
                    {
                        $wrapper->setRootValue($newRoot);
                    }
                }
            }
        }
    }
public function updateValues($first, $last, $delta, $oldRoot=null, $newRoot=null)
    {
        if(!$this->wrappers)
        {
            return;
        }

        $hasManyRoots = $this->getConfiguration()->hasManyRoots();

        foreach($this->wrappers as $wrapper)
        {
            if(!$hasManyRoots || ($wrapper->getRootValue() == $oldRoot))
            {
                if($wrapper->getLeftValue() >= $first && ($last === 0 || $wrapper->getRightValue() <= $last))
                {
                    if($delta !== 0)
                    {
                        $wrapper->setLeftValue($wrapper->getLeftValue() + $delta);
                        $wrapper->setRightValue($wrapper->getRightValue() + $delta);
                    }
                    if($hasManyRoots && $newRoot !== null)
                    {
                        $wrapper->setRootValue($newRoot);
                    }
                }
            }
        }
    }
public function updateValues ( $ first , $ last , $ delta , $ oldRoot = null , $ newRoot = null ) { if ( ! $ this -> wrappers ) { return ; } $ hasManyRoots = $ this -> getConfiguration ( ) -> hasManyRoots ( ) ; foreach ( $ this -> wrappers as $ wrapper ) { if ( ! $ hasManyRoots || ( $ wrapper -> getRootValue ( ) == $ oldRoot ) ) { if ( $ wrapper -> getLeftValue ( ) >= $ first && ( $ last === 0 || $ wrapper -> getRightValue ( ) <= $ last ) ) { if ( $ delta !== 0 ) { $ wrapper -> setLeftValue ( $ wrapper -> getLeftValue ( ) + $ delta ) ; $ wrapper -> setRightValue ( $ wrapper -> getRightValue ( ) + $ delta ) ; } if ( $ hasManyRoots && $ newRoot !== null ) { $ wrapper -> setRootValue ( $ newRoot ) ; } } } } }
Internal
Updates the left, right and root values of managed nodes

@param int $first lowerbound (lft/rgt) of nodes to update
@param int $last upperbound (lft/rgt) of nodes to update, or 0
@param int $delta delta to add to lft/rgt values (can be negative)
@param mixed $oldRoot the old root value of entities to act upon
@param mixed $newRoot the new root value to set (or null to not change root)
Internal Updates the left right and root values of managed nodes