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();
 
  194                $tax_id = (int) 
$_GET[
"tax_id"]; 
 
  195                if (in_array($tax_id, $tax_ids))
 
  237                $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  238                $ilToolbar->addFormButton(
$lng->txt(
"tax_create_node"), 
"createTaxNode");
 
  240                $ilToolbar->setCloseFormTag(
false);
 
  247                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyTableGUI.php");
 
  249                        (
int) 
$_GET[
"tax_node"], $this->getCurrentTaxonomy());
 
  250                $table->setOpenFormTag(
false);
 
  252                $tpl->setContent($table->getHTML());
 
  280                        return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_node_id);
 
  296                        $ilCtrl->redirect($this, 
"listTaxonomies");
 
  299                return parent::cancel();
 
  317                parent::saveObject();
 
  333                                $this->getAssignedObject());
 
  334                        $ilCtrl->setParameter($this, 
"tax_id", $a_new_object->
getId());
 
  336                        $ilCtrl->redirect($this, 
"editSettings");
 
  349                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  351                        ? 
"listAssignedItems" 
  354                        "ilobjtaxonomygui", 
$cmd);
 
  355                if (!$tax_exp->handleCommand())
 
  358                        $tpl->setLeftContent($tax_exp->getHTML().
" ");
 
  370                $a_target_class, $a_target_cmd, $a_root_node_title = 
"")
 
  372die(
"ilObjTaxonomyGUI::getTreeHTML is deprecated.");
 
  373                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  375                        $a_target_class, $a_target_cmd);
 
  376                if (!$tax_exp->handleCommand())
 
  378                        return $tax_exp->getHTML().
" ";
 
  392                global 
$tpl, $ilHelp;
 
  395                $ilHelp->setSubScreenId(
"create_node");
 
  398                $tpl->setContent($this->form->getHTML());
 
  411                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  416                $this->form->addItem($ti);
 
  422                        $or = 
new ilTextInputGUI($this->lng->txt(
"tax_order_nr"), 
"order_nr");
 
  423                        $or->setMaxLength(5);
 
  425                        $this->form->addItem($or);
 
  428                if ($a_mode == 
"edit")
 
  431                        $ti->setValue($node->getTitle());
 
  432                        $or->setValue($node->getOrderNr());
 
  436                if ($a_mode == 
"create")
 
  438                        $this->form->addCommandButton(
"saveTaxNode", 
$lng->txt(
"save"));
 
  439                        $this->form->addCommandButton(
"listNodes", 
$lng->txt(
"cancel"));
 
  440                        $this->form->setTitle(
$lng->txt(
"tax_new_tax_node"));
 
  444                        $this->form->addCommandButton(
"updateTaxNode", 
$lng->txt(
"save"));
 
  445                        $this->form->addCommandButton(
"listNodes", 
$lng->txt(
"cancel"));
 
  446                        $this->form->setTitle(
$lng->txt(
"tax_edit_tax_node"));
 
  449                $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  462                if ($this->form->checkInput())
 
  467                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  469                        $node->setTitle($this->form->getInput(
"title"));
 
  474                                $order_nr = $this->form->getInput(
"order_nr");
 
  476                        if ($order_nr === 
"")
 
  481                        $node->setOrderNr($order_nr);
 
  482                        $node->setTaxonomyId($tax->getId());
 
  491                        $ilCtrl->redirect($this, 
"listNodes");
 
  495                        $this->form->setValuesByPost();
 
  496                        $tpl->setContent($this->form->getHtml());
 
  509                if ($this->form->checkInput())
 
  513                        $node->setTitle($this->form->getInput(
"title"));
 
  518                                $node->setOrderNr($this->form->getInput(
"order_nr"));
 
  528                        $this->form->setValuesByPost();
 
  529                        $tpl->setContent($this->form->getHtml());
 
  543                        $ilCtrl->redirect($this, 
"listNodes");
 
  547                $ilHelp->setSubScreenId(
"del_items");
 
  551                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  554                $confirmation_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  555                $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  558                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  559                foreach(
$_POST[
"id"] as $id)
 
  561                        $confirmation_gui->addItem(
"id[]", $id,
 
  565                $confirmation_gui->setCancel(
$lng->txt(
"cancel"), 
"listNodes");
 
  566                $confirmation_gui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
  568                $tpl->setContent($confirmation_gui->getHTML());
 
  578                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  581                foreach (
$_POST[
"id"] as $id)
 
  585                        $tax_tree = $tax->getTree();
 
  586                        $node_data = $tax_tree->getNodeData($id);
 
  587                        if (is_object($node))
 
  591                        if($tax_tree->isInTree($id))
 
  593                                $tax_tree->deleteTree($node_data);
 
  601                $ilCtrl->redirect($this, 
"listNodes");
 
  615                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  616                if (is_array(
$_POST[
"order"]))
 
  620                        foreach (
$_POST[
"order"] as $k => $v)
 
  629                if (is_array(
$_POST[
"title"]))
 
  631                        foreach (
$_POST[
"title"] as $k => $v)
 
  640                $ilCtrl->redirect($this, 
"listNodes");
 
  653                        $ilCtrl->redirect($this, 
"listNodes");
 
  657                $ilHelp->setSubScreenId(
"move_items");
 
  659                $ilToolbar->addButton(
$lng->txt(
"cancel"),
 
  660                        $ilCtrl->getLinkTarget($this, 
"listNodes"));
 
  664                if (is_array(
$_POST[
"id"]))
 
  666                        $ilCtrl->setParameter($this, 
"move_ids", implode(
$_POST[
"id"], 
","));
 
  670                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  672                                "ilobjtaxonomygui", 
"pasteItems");
 
  673                        if (!$tax_exp->handleCommand())
 
  676                                $tpl->setContent($tax_exp->getHTML().
" ");
 
  689                if (
$_GET[
"move_ids"] != 
"")
 
  691                        $move_ids = explode(
",", 
$_GET[
"move_ids"]);
 
  693                        $tree = $tax->getTree();
 
  695                        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  697                        foreach ($move_ids as $m_id)
 
  701                                if ($node->getTaxonomyId() == $tax->getId() &&
 
  702                                        ($target_node->getTaxonomyId() == $tax->getId() ||
 
  703                                        $target_node->getId() == 
$tree->readRootId()))
 
  706                                        if(
$tree->isGrandChild((
int) $m_id, $target_node->getId()))
 
  709                                                $this->ctrl->redirect($this, 
"listNodes");
 
  716                                                $tree->moveTree((
int) $m_id, $target_node->getId());
 
  725                $ilCtrl->redirect($this, 
"listNodes");
 
  737                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  739                $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  740                $cgui->setHeaderText(
$lng->txt(
"tax_confirm_deletion"));
 
  741                $cgui->setCancel(
$lng->txt(
"cancel"), 
"listTaxonomies");
 
  742                $cgui->setConfirm(
$lng->txt(
"delete"), 
"deleteTaxonomy");
 
  744                $cgui->addItem(
"id[]", $i, $tax->getTitle());
 
  746                $tpl->setContent($cgui->getHTML());
 
  763                $ilCtrl->redirect($this, 
"listTaxonomies");
 
  779                        $ilToolbar->addButton(
$lng->txt(
"tax_add_taxonomy"),
 
  780                                $ilCtrl->getLinkTarget($this, 
"createAssignedTaxonomy"));
 
  787                include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
 
  792                $tpl->setContent(
$tab->getHTML());
 
  804                $ilTabs->clearTargets();
 
  806                $ilHelp->setScreenIdComponent(
"tax");
 
  812                $ilTabs->setBackTarget(
$lng->txt(
"back"),
 
  813                        $ilCtrl->getLinkTarget($this, 
"listTaxonomies"));
 
  815                $ilTabs->addTab(
"list_items", 
$lng->txt(
"tax_nodes"),
 
  816                        $ilCtrl->getLinkTarget($this, 
"listNodes"));
 
  817                if ($this->assigned_item_sorting)
 
  819                        $ilTabs->addTab(
"ass_items", 
$lng->txt(
"tax_assigned_items"),
 
  820                                $ilCtrl->getLinkTarget($this, 
"listAssignedItems"));
 
  822                $ilTabs->addTab(
"settings", 
$lng->txt(
"settings"),
 
  823                        $ilCtrl->getLinkTarget($this, 
"editSettings"));
 
  825                $ilTabs->activateTab($a_id);
 
  841                $tpl->setContent($form->getHTML());
 
  853                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  858                $ti->setMaxLength(200);
 
  860                $ti->setValue($tax->getTitle());
 
  867                $ta->setValue($tax->getDescription());
 
  877                $si->setValue($tax->getSortingMode());
 
  880                if ($this->assigned_item_sorting)
 
  883                        $cb->setChecked($tax->getItemSorting());
 
  887                $form->addCommandButton(
"updateSettings", 
$lng->txt(
"save"));
 
  889                $form->setTitle(
$lng->txt(
"settings"));
 
  890                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  903                if ($form->checkInput())
 
  906                        $tax->setTitle($form->getInput(
"title"));
 
  907                        $tax->setDescription($form->getInput(
"description"));
 
  908                        $tax->setSortingMode($form->getInput(
"sorting"));
 
  909                        $tax->setItemSorting($form->getInput(
"item_sorting"));
 
  913                        $ilCtrl->redirect($this, 
"editSettings");
 
  917                        $form->setValuesByPost();
 
  918                        $tpl->setContent($form->getHtml());
 
  940                include_once(
"./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
 
  943                        $this->assigned_item_obj_id, $this->assigned_item_type, $this->assigned_item_info_obj);
 
  945                $tpl->setContent($table->getHTML());
 
  958                include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
  959                if (is_array(
$_POST[
"order"]))
 
  964                        $tax_node = (int) 
$_GET[
"tax_node"];
 
  965                        foreach ($order as $a_item_id => $ord_nr)
 
  968                                        $this->assigned_item_obj_id,
 
  970                                $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
 
  974                                $this->assigned_item_obj_id,
 
  976                        $tax_ass->fixOrderNr($tax_node);
 
  979                $ilCtrl->redirect($this, 
"listAssignedItems");
 
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.
initCreationForms()
Init creation forms.
__construct($a_id=0)
Execute command.
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
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($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options