File tree Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 66 - ` prependTo ` to ` prependToNode `
77 - ` insertBefore ` to ` insertBeforeNode `
88 - ` insertAfter ` to ` insertAfterNode `
9+ - ` getNext ` to ` getNextNode `
10+ - ` getPrev ` to ` getPrevNode `
911
1012### 3.1.1
1113
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class Node extends Model
2121 * @param Node $parent
2222 *
2323 * @return $this
24- *
24+ *
2525 * @deprecated since 4.1
2626 */
2727 public function appendTo (self $ parent )
@@ -65,6 +65,30 @@ public function insertAfter(self $node)
6565 return $ this ->insertAfterNode ($ node );
6666 }
6767
68+ /**
69+ * @param array $columns
70+ *
71+ * @return self|null
72+ *
73+ * @deprecated since 4.1
74+ */
75+ public function getNext (array $ columns = [ '* ' ])
76+ {
77+ return $ this ->getNextNode ($ columns );
78+ }
79+
80+ /**
81+ * @param array $columns
82+ *
83+ * @return self|null
84+ *
85+ * @deprecated since 4.1
86+ */
87+ public function getPrev (array $ columns = [ '* ' ])
88+ {
89+ return $ this ->getPrevNode ($ columns );
90+ }
91+
6892 /**
6993 * @return string
7094 */
Original file line number Diff line number Diff line change @@ -833,21 +833,29 @@ public function getParentId()
833833 }
834834
835835 /**
836- * @param array $columns
836+ * Returns node that is next to current node without constraining to siblings.
837+ *
838+ * This can be either a next sibling or a next sibling of the parent node.
839+ *
840+ * @param array $columns
837841 *
838842 * @return self
839843 */
840- public function getNext (array $ columns = array ( '* ' ))
844+ public function getNextNode (array $ columns = array ( '* ' ))
841845 {
842846 return $ this ->nextNodes ()->first ($ columns );
843847 }
844848
845849 /**
850+ * Returns node that is before current node without constraining to siblings.
851+ *
852+ * This can be either a prev sibling or parent node.
853+ *
846854 * @param array $columns
847855 *
848856 * @return self
849857 */
850- public function getPrev (array $ columns = array ( '* ' ))
858+ public function getPrevNode (array $ columns = array ( '* ' ))
851859 {
852860 return $ this ->prevNodes ()->first ($ columns );
853861 }
You can’t perform that action at this time.
0 commit comments