private function duplicateTaxonomyFromPoolToTest($poolTaxonomyId) { $testTaxonomy = new ilObjTaxonomy(); $testTaxonomy->create(); $poolTaxonomy = new ilObjTaxonomy($poolTaxonomyId); $poolTaxonomy->doCloneObject($testTaxonomy, null, null); $poolTaxonomy->getTree()->readRootId(); $testTaxonomy->getTree()->readRootId(); $testTaxonomy->update(); ilObjTaxonomy::saveUsage($testTaxonomy->getId(), $this->testOBJ->getId()); $this->duplicatedTaxonomiesKeysMap->addDuplicatedTaxonomy($poolTaxonomy, $testTaxonomy); }
/** * Delete taxonomy nodes */ function confirmedDelete() { global $ilCtrl; include_once "./Services/Taxonomy/classes/class.ilTaxonomyNode.php"; // delete all selected objects foreach ($_POST["id"] as $id) { $node = new ilTaxonomyNode($id); $tax = new ilObjTaxonomy($node->getTaxonomyId()); $tax_tree = $tax->getTree(); $node_data = $tax_tree->getNodeData($id); if (is_object($node)) { $node->delete(); } if ($tax_tree->isInTree($id)) { $tax_tree->deleteTree($node_data); } ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]); } // feedback ilUtil::sendInfo($this->lng->txt("info_deleted"), true); $ilCtrl->redirect($this, "listNodes"); }