public function moveUp($entity) {
		extract($this->_config);
		$prev = $model::find('first', [
			'conditions' => [
				$parent => $entity->$parent,
				$right => $entity->$left - 1
			]
		]);
		if (!$prev) {
			return true;
		}
		$spanToZero = $entity->$right;
		$rangeX = ['floor' => $entity->$left, 'ceiling' => $entity->$right];
		$shiftX = ($prev->$right - $prev->$left) + 1;
		$rangeY = ['floor' => $prev->$left, 'ceiling' => $prev->$right];
		$shiftY = ($entity->$right - $entity->$left) + 1;

		$this->_updateBetween($rangeX, '-', $spanToZero, $this->_scope($entity));
		$this->_updateBetween($rangeY, '+', $shiftY, $this->_scope($entity));
		$this->_updateBetween([
			'floor' => (0 - $shiftY), 'ceiling' => 0
		], '+', $spanToZero - $shiftX, $this->_scope($entity));

		$entity->set([
			$left => $entity->$left - $shiftX, $right => $entity->$right - $shiftX
		]);
		return true;
	}
public function moveUp($entity) {
		extract($this->_config);
		$prev = $model::find('first', [
			'conditions' => [
				$parent => $entity->$parent,
				$right => $entity->$left - 1
			]
		]);
		if (!$prev) {
			return true;
		}
		$spanToZero = $entity->$right;
		$rangeX = ['floor' => $entity->$left, 'ceiling' => $entity->$right];
		$shiftX = ($prev->$right - $prev->$left) + 1;
		$rangeY = ['floor' => $prev->$left, 'ceiling' => $prev->$right];
		$shiftY = ($entity->$right - $entity->$left) + 1;

		$this->_updateBetween($rangeX, '-', $spanToZero, $this->_scope($entity));
		$this->_updateBetween($rangeY, '+', $shiftY, $this->_scope($entity));
		$this->_updateBetween([
			'floor' => (0 - $shiftY), 'ceiling' => 0
		], '+', $spanToZero - $shiftX, $this->_scope($entity));

		$entity->set([
			$left => $entity->$left - $shiftX, $right => $entity->$right - $shiftX
		]);
		return true;
	}
public function moveUp ( $ entity ) { extract ( $ this -> _config ) ; $ prev = $ model :: find ( 'first' , [ 'conditions' => [ $ parent => $ entity -> $ parent , $ right => $ entity -> $ left - 1 ] ] ) ; if ( ! $ prev ) { return true ; } $ spanToZero = $ entity -> $ right ; $ rangeX = [ 'floor' => $ entity -> $ left , 'ceiling' => $ entity -> $ right ] ; $ shiftX = ( $ prev -> $ right - $ prev -> $ left ) + 1 ; $ rangeY = [ 'floor' => $ prev -> $ left , 'ceiling' => $ prev -> $ right ] ; $ shiftY = ( $ entity -> $ right - $ entity -> $ left ) + 1 ; $ this -> _updateBetween ( $ rangeX , '-' , $ spanToZero , $ this -> _scope ( $ entity ) ) ; $ this -> _updateBetween ( $ rangeY , '+' , $ shiftY , $ this -> _scope ( $ entity ) ) ; $ this -> _updateBetween ( [ 'floor' => ( 0 - $ shiftY ) , 'ceiling' => 0 ] , '+' , $ spanToZero - $ shiftX , $ this -> _scope ( $ entity ) ) ; $ entity -> set ( [ $ left => $ entity -> $ left - $ shiftX , $ right => $ entity -> $ right - $ shiftX ] ) ; return true ; }
Moves an element up in order

@param object $entity The Entity to move up
Moves an element up in order