src/Franzose/ClosureTable/Models/Entity.php
protected function clampPosition()
    {
        if (!$this->isDirty($this->getPositionColumn())) {
            return;
        }
        $newPosition = max(0, min($this->position, $this->getNextAfterLastPosition()));
        $this->attributes[$this->getPositionColumn()] = $newPosition;
    }
protected function clampPosition()
    {
        if (!$this->isDirty($this->getPositionColumn())) {
            return;
        }
        $newPosition = max(0, min($this->position, $this->getNextAfterLastPosition()));
        $this->attributes[$this->getPositionColumn()] = $newPosition;
    }
protected function clampPosition ( ) { if ( ! $ this -> isDirty ( $ this -> getPositionColumn ( ) ) ) { return ; } $ newPosition = max ( 0 , min ( $ this -> position , $ this -> getNextAfterLastPosition ( ) ) ) ; $ this -> attributes [ $ this -> getPositionColumn ( ) ] = $ newPosition ; }
Clamp the position between 0 and the last position of the current parent.
Clamp the position between 0 and the last position of the current parent .