DB_NestedSet::convertTreeModel
Вернуться к: DB_NestedSet
DB_NestedSet::convertTreeModel
Synopsis
bool DB_NestedSet::convertTreeModel ( &$orig , &$copy , integer $_parent = false , object $ )
This will convert the tree into a format needed for some new features in 1.3. Your <1.3 tree will still work without converting but some new features like preorder sorting won't work as expected.
Usage:
- Create a new node table (tb_nodes2) from the current node table (tb_nodes1) (only copy the structure).
- Create a nested set instance of the 'old' set (NeSe1) and one of the new set (NeSe2)
- Now you have 2 identical objects where only node_table differs
- Call DB_NestedSet::convertTreeModel(&$orig, &$copy);
- After that you have a cleaned up copy of tb_nodes1 inside tb_nodes2
Parameter
- &$orig
- &$copy
- integer $_parent
-
ID of the parent node (private)
- object $copy
-
Object where the new tree is copied to
Return value
returns True uns success
Throws
throws no exceptions thrown
Note
This function can not be called statically.
Вернуться к: DB_NestedSet