4require_once 
"./Services/Object/classes/class.ilObject2GUI.php";
 
    5require_once 
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
 
    6include_once(
"./Services/Taxonomy/interfaces/interface.ilTaxAssignedItemInfo.php");
 
   32                $ilCtrl->saveParameter($this, 
"tax_node");
 
   33                $ilCtrl->saveParameter($this, 
"tax_id");
 
   35                $lng->loadLanguageModule(
"tax");
 
   55                $this->assigned_object_id = $a_val;
 
   65                return $this->assigned_object_id;
 
   75                $this->multiple = $a_val;
 
   95                $this->list_info = trim($a_val);
 
  105                return $this->list_info;
 
  115                $this->assigned_item_sorting = 
true;
 
  116                $this->assigned_item_info_obj = $a_item_info_obj;
 
  117                $this->assigned_item_comp_id = $a_component_id;
 
  118                $this->assigned_item_obj_id = $a_obj_id;
 
  119                $this->assigned_item_type = $a_item_type;
 
  130                $next_class = 
$ilCtrl->getNextClass();
 
  192                $tax_id = (int) 
$_GET[
"tax_id"]; 
 
  193                if (in_array($tax_id, $tax_ids))
 
  235                $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  236                $ilToolbar->addFormButton(
$lng->txt(
"tax_create_node"), 
"createTaxNode");
 
  238                $ilToolbar->setCloseFormTag(
false);
 
  245                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyTableGUI.php");
 
  247                        (
int) 
$_GET[
"tax_node"], $this->getCurrentTaxonomy());
 
  248                $table->setOpenFormTag(
false);
 
  250                $tpl->setContent($table->getHTML());
 
  278                        return parent::checkPermissionBool($a_perm, $a_cmd, 
$a_type, $a_node_id);
 
  294                        $ilCtrl->redirect($this, 
"listTaxonomies");
 
  297                return parent::cancel();
 
  312                        $_REQUEST[
"new_type"] = 
"tax";
 
  315                parent::saveObject();
 
  331                                $this->getAssignedObject());
 
  332                        $ilCtrl->setParameter($this, 
"tax_id", $a_new_object->
getId());
 
  334                        $ilCtrl->redirect($this, 
"editSettings");
 
  347                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  349                        ? 
"listAssignedItems" 
  352                        "ilobjtaxonomygui", 
$cmd);
 
  353                if (!$tax_exp->handleCommand())
 
  356                        $tpl->setLeftContent($tax_exp->getHTML().
" ");
 
  368                $a_target_class, $a_target_cmd, $a_root_node_title = 
"")
 
  370die(
"ilObjTaxonomyGUI::getTreeHTML is deprecated.");
 
  371                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  373                        $a_target_class, $a_target_cmd);
 
  374                if (!$tax_exp->handleCommand())
 
  376                        return $tax_exp->getHTML().
" ";
 
  390                global 
$tpl, $ilHelp;
 
  393                $ilHelp->setSubScreenId(
"create_node");
 
  396                $tpl->setContent($this->form->getHTML());
 
  409                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  414                $this->form->addItem($ti);
 
  420                        $or = 
new ilTextInputGUI($this->lng->txt(
"tax_order_nr"), 
"order_nr");
 
  421                        $or->setMaxLength(5);
 
  423                        $this->form->addItem($or);
 
  426                if ($a_mode == 
"edit")
 
  429                        $ti->setValue($node->getTitle());
 
  430                        $or->setValue($node->getOrderNr());
 
  434                if ($a_mode == 
"create")
 
  436                        $this->form->addCommandButton(
"saveTaxNode", 
$lng->txt(
"save"));
 
  437                        $this->form->addCommandButton(
"listNodes", 
$lng->txt(
"cancel"));
 
  438                        $this->form->setTitle(
$lng->txt(
"tax_new_tax_node"));
 
  442                        $this->form->addCommandButton(
"updateTaxNode", 
$lng->txt(
"save"));
 
  443                        $this->form->addCommandButton(
"listNodes", 
$lng->txt(
"cancel"));
 
  444                        $this->form->setTitle(
$lng->txt(
"tax_edit_tax_node"));
 
  447                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  460                if ($this->form->checkInput())
 
  465                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  467                        $node->setTitle($this->form->getInput(
"title"));
 
  472                                $order_nr = $this->form->getInput(
"order_nr");
 
  474                        if ($order_nr === 
"")
 
  479                        $node->setOrderNr($order_nr);
 
  480                        $node->setTaxonomyId($tax->getId());
 
  489                        $ilCtrl->redirect($this, 
"listNodes");
 
  493                        $this->form->setValuesByPost();
 
  494                        $tpl->setContent($this->form->getHtml());
 
  507                if ($this->form->checkInput())
 
  511                        $node->setTitle($this->form->getInput(
"title"));
 
  516                                $node->setOrderNr($this->form->getInput(
"order_nr"));
 
  526                        $this->form->setValuesByPost();
 
  527                        $tpl->setContent($this->form->getHtml());
 
  541                        $ilCtrl->redirect($this, 
"listNodes");
 
  545                $ilHelp->setSubScreenId(
"del_items");
 
  549                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  552                $confirmation_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  553                $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  556                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  557                foreach(
$_POST[
"id"] as $id)
 
  559                        $confirmation_gui->addItem(
"id[]", $id,
 
  563                $confirmation_gui->setCancel(
$lng->txt(
"cancel"), 
"listNodes");
 
  564                $confirmation_gui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
  566                $tpl->setContent($confirmation_gui->getHTML());
 
  576                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  579                foreach (
$_POST[
"id"] as $id)
 
  583                        $tax_tree = $tax->getTree();
 
  584                        $node_data = $tax_tree->getNodeData($id);
 
  585                        if (is_object($node))
 
  589                        if($tax_tree->isInTree($id))
 
  591                                $tax_tree->deleteTree($node_data);
 
  599                $ilCtrl->redirect($this, 
"listNodes");
 
  613                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  614                if (is_array(
$_POST[
"order"]))
 
  618                        foreach (
$_POST[
"order"] as $k => $v)
 
  626                if (is_array(
$_POST[
"title"]))
 
  628                        foreach (
$_POST[
"title"] as $k => $v)
 
  637                $ilCtrl->redirect($this, 
"listNodes");
 
  650                        $ilCtrl->redirect($this, 
"listNodes");
 
  654                $ilHelp->setSubScreenId(
"move_items");
 
  656                $ilToolbar->addButton(
$lng->txt(
"cancel"),
 
  657                        $ilCtrl->getLinkTarget($this, 
"listNodes"));
 
  661                if (is_array(
$_POST[
"id"]))
 
  663                        $ilCtrl->setParameter($this, 
"move_ids", implode(
$_POST[
"id"], 
","));
 
  667                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  669                                "ilobjtaxonomygui", 
"pasteItems");
 
  670                        if (!$tax_exp->handleCommand())
 
  673                                $tpl->setContent($tax_exp->getHTML().
" ");
 
  686                if (
$_GET[
"move_ids"] != 
"")
 
  688                        $move_ids = explode(
",", 
$_GET[
"move_ids"]);
 
  690                        $tree = $tax->getTree();
 
  692                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  694                        foreach ($move_ids as $m_id)
 
  698                                if ($node->getTaxonomyId() == $tax->getId() &&
 
  699                                        ($target_node->getTaxonomyId() == $tax->getId() ||
 
  700                                        $target_node->getId() == 
$tree->readRootId()))
 
  703                                        if(
$tree->isGrandChild((
int) $m_id, $target_node->getId()))
 
  706                                                $this->ctrl->redirect($this, 
"listNodes");
 
  713                                                $tree->moveTree((
int) $m_id, $target_node->getId());
 
  722                $ilCtrl->redirect($this, 
"listNodes");
 
  734                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  736                $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  737                $cgui->setHeaderText(
$lng->txt(
"tax_confirm_deletion"));
 
  738                $cgui->setCancel(
$lng->txt(
"cancel"), 
"listTaxonomies");
 
  739                $cgui->setConfirm(
$lng->txt(
"delete"), 
"deleteTaxonomy");
 
  741                $cgui->addItem(
"id[]", $i, $tax->getTitle());
 
  743                $tpl->setContent($cgui->getHTML());
 
  760                $ilCtrl->redirect($this, 
"listTaxonomies");
 
  776                        $ilToolbar->addButton(
$lng->txt(
"tax_add_taxonomy"),
 
  777                                $ilCtrl->getLinkTarget($this, 
"createAssignedTaxonomy"));
 
  784                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
 
  789                $tpl->setContent(
$tab->getHTML());
 
  801                $ilTabs->clearTargets();
 
  803                $ilHelp->setScreenIdComponent(
"tax");
 
  810                $ilTabs->setBackTarget(
$lng->txt(
"back"),
 
  811                        $ilCtrl->getLinkTarget($this, 
"listTaxonomies"));
 
  813                $ilTabs->addTab(
"list_items", 
$lng->txt(
"tax_nodes"),
 
  814                        $ilCtrl->getLinkTarget($this, 
"listNodes"));
 
  815                if ($this->assigned_item_sorting)
 
  817                        $ilTabs->addTab(
"ass_items", 
$lng->txt(
"tax_assigned_items"),
 
  818                                $ilCtrl->getLinkTarget($this, 
"listAssignedItems"));
 
  820                $ilTabs->addTab(
"settings", 
$lng->txt(
"settings"),
 
  821                        $ilCtrl->getLinkTarget($this, 
"editSettings"));
 
  823                $ilTabs->activateTab($a_id);
 
  839                $tpl->setContent($form->getHTML());
 
  851                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  856                $ti->setMaxLength(200);
 
  858                $ti->setValue($tax->getTitle());
 
  865                $ta->setValue($tax->getDescription());
 
  875                $si->setValue($tax->getSortingMode());
 
  878                if ($this->assigned_item_sorting)
 
  881                        $cb->setChecked($tax->getItemSorting());
 
  885                $form->addCommandButton(
"updateSettings", 
$lng->txt(
"save"));
 
  887                $form->setTitle(
$lng->txt(
"settings"));
 
  888                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  901                if ($form->checkInput())
 
  904                        $tax->setTitle($form->getInput(
"title"));
 
  905                        $tax->setDescription($form->getInput(
"description"));
 
  906                        $tax->setSortingMode($form->getInput(
"sorting"));
 
  907                        $tax->setItemSorting($form->getInput(
"item_sorting"));
 
  911                        $ilCtrl->redirect($this, 
"editSettings");
 
  915                        $form->setValuesByPost();
 
  916                        $tpl->setContent($form->getHtml());
 
  938                include_once(
"./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
 
  941                        $this->assigned_item_obj_id, $this->assigned_item_type, $this->assigned_item_info_obj);
 
  943                $tpl->setContent($table->getHTML());
 
  956                include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
  957                if (is_array(
$_POST[
"order"]))
 
  962                        $tax_node = (int) 
$_GET[
"tax_node"];
 
  963                        foreach ($order as $a_item_id => $ord_nr)
 
  966                                        $this->assigned_item_obj_id,
 
  968                                $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
 
  972                                $this->assigned_item_obj_id,
 
  974                        $tax_ass->fixOrderNr($tax_node);
 
  977                $ilCtrl->redirect($this, 
"listAssignedItems");
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
pasteItems()
Paste items (move operation)
createTaxNode()
Create tax node.
confirmDeleteTaxonomy()
Confirm taxonomy deletion.
saveSorting()
Save settings and sorting.
deleteItems()
Confirm deletion screen for items.
afterSave(ilObject $a_new_object)
After saving,.
listTaxonomies()
List taxonomies.
editSettings()
Edit settings.
executeCommand()
Execute command.
confirmedDelete()
Delete taxonomy nodes.
createAssignedTaxonomy()
Create assigned taxonomy.
__construct($a_id=0)
Execute command.
initCreationForms($a_new_type)
Init creation forms.
setTabs($a_id="")
Set tabs.
updateTaxNode()
Update tax node.
activateAssignedItemSorting(ilTaxAssignedItemInfo $a_item_info_obj, $a_component_id, $a_obj_id, $a_item_type)
Activate sorting mode of assigned objects.
setMultiple($a_val)
Set multiple.
showTree($a_ass_items=false)
Show Editing Tree.
initSettingsForm()
Init form.
deleteTaxonomy()
Delete taxonomy.
updateSettings()
Update taxonomy settings.
saveAssignedItemsSorting()
Save assigned items sorting.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
If we run under an assigned object, the permission should be checked on the upper level.
initTaxNodeForm($a_mode="edit")
Init tax node form.
getCurrentTaxonomy()
Get current taxonomy.
static getTreeHTML($a_tax_id, $a_class, $a_cmd, $a_target_class, $a_target_cmd, $a_root_node_title="")
Get tree html.
getListInfo()
Get list info.
getMultiple()
Get multiple.
setListInfo($a_val)
Set list info.
getCurrentTaxonomyId()
Get current taxonomy id.
listAssignedItems()
List assigned items.
setAssignedObject($a_val)
Set assigned object.
saveTaxNode()
Save tax node form.
getAssignedObject()
Get assigned object.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.
New implementation of ilObjectGUI.
create()
Deleted in ilObject.
setTabs()
create tabs (repository/workspace switch)
initCreateForm($a_new_type)
Init object creation form.
Class ilObject Basic functions for all objects.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
getId()
get object id @access public
TableGUI class for taxonomy list.
Taxonomy node <-> item assignment.
Taxonomy explorer GUI class.
TableGUI class for taxonomy list.
static writeOrderNr($a_node_id, $a_order_nr)
Write order nr.
static putInTree($a_tax_id, $a_node, $a_parent_id="", $a_target_node_id="", $a_order_nr=0)
Put this node into the taxonomy tree.
static fixOrderNumbers($a_tax_id, $a_parent_id)
Fix order numbers.
static writeTitle($a_node_id, $a_title)
Write title.
static _lookupTitle($a_obj_id)
Lookup Title.
static getNextOrderNr($a_tax_id, $a_parent_id)
Put this node into the taxonomy tree.
TableGUI class for taxonomies.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Interface for assigned items of taxonomies.
if(!is_array($argv)) $options