Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Corrected function names and comments #276

Merged
merged 1 commit into from

2 participants

125BCT066 Marc J. Schmidt
125BCT066

Also corrected use of deleteDescendants() function call.

Marc J. Schmidt
Owner

Good catch, thanks!

Marc J. Schmidt marcj merged commit 4f26fb0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2014
  1. 125BCT066
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 behaviors/nested-set.markdown
8 behaviors/nested-set.markdown
View
@@ -82,7 +82,7 @@ Each of the traversal and inspection methods result in a single database query,
## Manipulating Nodes ##
-You can move a node - and its subtree - across the tree using any of the `moveToFirstChildOf()`, `moveToLastChildOf()`, `moveToPrevSiblingOf()`, and `moveToLastSiblingOf()` methods. These operations are immediate and don't require that you save the model afterwards:
+You can move a node - and its subtree - across the tree using any of the `moveToFirstChildOf()`, `moveToLastChildOf()`, `moveToPrevSiblingOf()`, and `moveToNextSiblingOf()` methods. These operations are immediate and don't require that you save the model afterwards:
```php
<?php
@@ -98,7 +98,7 @@ $s2:World
$s3:Europe
*/
// now move the "Europe" section directly under root, after "Business"
-$s2->moveToFirstChildOf($s4);
+$s3->moveToNextSiblingOf($s4);
/* The tree is modified as follows:
$s1:Home
| \
@@ -112,8 +112,8 @@ You can delete the descendants of a node using `deleteDescendants()`:
```php
<?php
-// move the entire "World" section under "Business"
-$s4->deleteDescendants($s4);
+// delete the entire "World" section of "Business"
+$s4->deleteDescendants();
/* The tree is modified as follows:
$s1:Home
| \
Something went wrong with that request. Please try again.