本文整理匯總了PHP中ilTree::renumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilTree::renumber方法的具體用法?PHP ilTree::renumber怎麽用?PHP ilTree::renumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilTree
的用法示例。
在下文中一共展示了ilTree::renumber方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: switchTree
public function switchTree()
{
$set = new ilSetting('common');
$type = $set->get('main_tree_impl', 'ns') == 'ns' ? 'ns' : 'mp';
if ($type == 'ns' and $_POST['tree_impl_type'] == 'mp') {
// To mp
include_once './Services/Tree/classes/class.ilMaterializedPathTree.php';
ilMaterializedPathTree::createFromParentReleation();
$set->set('main_tree_impl', 'mp');
} elseif ($type == 'mp' and $_POST['tree_impl_type'] == 'ns') {
include_once './Services/Tree/classes/class.ilTree.php';
$GLOBALS['ilSetting'] = $set;
$tree = new ilTree(1);
$tree->renumber(1);
$set->set('main_tree_impl', 'ns');
}
ilUtil::sendInfo($this->lng->txt("tree_implementation_switched"), true);
$this->displayTools();
}