DB_NestedSet::convertTreeModel

DB_NestedSet::convertTreeModel() – Convert a <1.3 tree into a 1.3 tree format

Synopsis

require_once 'DB/NestedSet.php';

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

Замечание

This function can not be called statically.

    Поддержать сайт на родительском проекте КГБ