bartko-s / stefano-tree

Framework agnostic Nested Set (MPTT) implementation for PHP
https://bartko-s.github.io/stefano-tree
BSD 3-Clause "New" or "Revised" License
28 stars 8 forks source link

What is the scope and the target? #6

Closed grifx closed 8 years ago

grifx commented 8 years ago

Hi, I have few questions. What is a scope? Is there a way to have many root nodes? When you move a node, will the "target" be the new parentId?

Thanks!

bartko-s commented 8 years ago

Hi, Yes there is a way to have many root nodes(many trees in one db table). If you set "scopeColumnName" then you are able to create more then one root(tree) per db table. Yes when you move or create node then "target" will be new "parentId" but only when you use addNodePlacementChildBottom(), addNodePlacementChildTop(), moveNodePlacementChildBottom(), moveNodePlacementChildTop().

grifx commented 8 years ago

Thanks :)

videni commented 4 years ago

form the scope is really non-sense, A post can have lots of comments, each comment has its reples. every the first level comment is root node.