|
@@ -598,12 +598,12 @@ class TreeBehavior extends Behavior
|
|
|
* Reorders the node without changing its parent.
|
|
* Reorders the node without changing its parent.
|
|
|
*
|
|
*
|
|
|
* If the node is the first child, or is a top level node with no previous node
|
|
* If the node is the first child, or is a top level node with no previous node
|
|
|
- * this method will return false
|
|
|
|
|
|
|
+ * this method will return the same node without any changes
|
|
|
*
|
|
*
|
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
|
* @param int|bool $number How many places to move the node, or true to move to first position
|
|
* @param int|bool $number How many places to move the node, or true to move to first position
|
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
|
- * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
|
|
|
|
|
|
|
+ * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false if `$number` is < 1
|
|
|
*/
|
|
*/
|
|
|
public function moveUp(EntityInterface $node, $number = 1)
|
|
public function moveUp(EntityInterface $node, $number = 1)
|
|
|
{
|
|
{
|
|
@@ -624,7 +624,7 @@ class TreeBehavior extends Behavior
|
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
|
* @param int|bool $number How many places to move the node, or true to move to first position
|
|
* @param int|bool $number How many places to move the node, or true to move to first position
|
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
|
- * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
|
|
|
|
|
|
|
+ * @return \Cake\Datasource\EntityInterface|false $node The node after being moved
|
|
|
*/
|
|
*/
|
|
|
protected function _moveUp($node, $number)
|
|
protected function _moveUp($node, $number)
|
|
|
{
|
|
{
|
|
@@ -688,12 +688,12 @@ class TreeBehavior extends Behavior
|
|
|
* Reorders the node without changing the parent.
|
|
* Reorders the node without changing the parent.
|
|
|
*
|
|
*
|
|
|
* If the node is the last child, or is a top level node with no subsequent node
|
|
* If the node is the last child, or is a top level node with no subsequent node
|
|
|
- * this method will return false
|
|
|
|
|
|
|
+ * this method will return the same node without any changes
|
|
|
*
|
|
*
|
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
|
* @param int|bool $number How many places to move the node or true to move to last position
|
|
* @param int|bool $number How many places to move the node or true to move to last position
|
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
|
- * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false on failure
|
|
|
|
|
|
|
+ * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false if `$number` is < 1
|
|
|
*/
|
|
*/
|
|
|
public function moveDown(EntityInterface $node, $number = 1)
|
|
public function moveDown(EntityInterface $node, $number = 1)
|
|
|
{
|
|
{
|
|
@@ -714,7 +714,7 @@ class TreeBehavior extends Behavior
|
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
* @param \Cake\Datasource\EntityInterface $node The node to move
|
|
|
* @param int|bool $number How many places to move the node, or true to move to last position
|
|
* @param int|bool $number How many places to move the node, or true to move to last position
|
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
* @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
|
|
|
- * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
|
|
|
|
|
|
|
+ * @return \Cake\Datasource\EntityInterface|false $node The node after being moved
|
|
|
*/
|
|
*/
|
|
|
protected function _moveDown($node, $number)
|
|
protected function _moveDown($node, $number)
|
|
|
{
|
|
{
|