4require_once 
"./Services/Object/classes/class.ilObject2GUI.php";
 
    5require_once 
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
 
    6include_once(
"./Services/Taxonomy/interfaces/interface.ilTaxAssignedItemInfo.php");
 
   40        $this->ctrl = 
$DIC->ctrl();
 
   41        $this->lng = 
$DIC->language();
 
   42        $this->
user = $DIC->user();
 
   43        $this->tabs = 
$DIC->tabs();
 
   44        $this->toolbar = 
$DIC->toolbar();
 
   45        $this->tpl = 
$DIC[
"tpl"];
 
   46        $this->
help = $DIC[
"ilHelp"];
 
   52        $ilCtrl->saveParameter($this, 
"tax_node");
 
   53        $ilCtrl->saveParameter($this, 
"tax_id");
 
   55        $lng->loadLanguageModule(
"tax");
 
   75        $this->assigned_object_id = $a_val;
 
   85        return $this->assigned_object_id;
 
   95        $this->multiple = $a_val;
 
  115        $this->list_info = trim($a_val);
 
  125        return $this->list_info;
 
  135        $this->assigned_item_sorting = 
true;
 
  136        $this->assigned_item_info_obj = $a_item_info_obj;
 
  137        $this->assigned_item_comp_id = $a_component_id;
 
  138        $this->assigned_item_obj_id = $a_obj_id;
 
  139        $this->assigned_item_type = $a_item_type;
 
  152        $next_class = 
$ilCtrl->getNextClass();
 
  154        switch ($next_class) {
 
  156                $cmd = 
$ilCtrl->getCmd(
"listTaxonomies");
 
  214        $tax_id = (int) 
$_GET[
"tax_id"];
 
  215        if (in_array($tax_id, $tax_ids)) {
 
  258        $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
 
  259        $ilToolbar->addFormButton(
$lng->txt(
"tax_create_node"), 
"createTaxNode");
 
  261        $ilToolbar->setCloseFormTag(
false);
 
  268        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyTableGUI.php");
 
  273            (
int) 
$_GET[
"tax_node"],
 
  274            $this->getCurrentTaxonomy()
 
  276        $table->setOpenFormTag(
false);
 
  278        $tpl->setContent($table->getHTML());
 
  303            return parent::checkPermissionBool($a_perm, $a_cmd, 
$a_type, $a_node_id);
 
  318            $ilCtrl->redirect($this, 
"listTaxonomies");
 
  321        return parent::cancel();
 
  335            $_REQUEST[
"new_type"] = 
"tax";
 
  338        parent::saveObject();
 
  354                $a_new_object->
getId(),
 
  355                $this->getAssignedObject()
 
  357            $ilCtrl->setParameter($this, 
"tax_id", $a_new_object->
getId());
 
  358            ilUtil::sendSuccess(
$lng->txt(
"tax_added"), 
true);
 
  359            $ilCtrl->redirect($this, 
"editSettings");
 
  376            ? 
"listAssignedItems" 
  379        $DIC->globalScreen()->tool()->context()->current()
 
  384        $DIC->globalScreen()->tool()->context()->current()
 
  387                $ctrl->getCurrentClassPath()
 
  389        $DIC->globalScreen()->tool()->context()->current()
 
  394        $DIC->globalScreen()->tool()->context()->current()
 
  399        $DIC->globalScreen()->tool()->context()->current()
 
  412        $tax_exp->handleCommand();
 
  428        $a_root_node_title = 
"" 
  430        die(
"ilObjTaxonomyGUI::getTreeHTML is deprecated.");
 
  431        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  439        if (!$tax_exp->handleCommand()) {
 
  440            return $tax_exp->getHTML() . 
" ";
 
  458        $ilHelp->setSubScreenId(
"create_node");
 
  461        $tpl->setContent($this->form->getHTML());
 
  475        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  480        $this->form->addItem($ti);
 
  485            $or = 
new ilTextInputGUI($this->lng->txt(
"tax_order_nr"), 
"order_nr");
 
  486            $or->setMaxLength(5);
 
  488            $this->form->addItem($or);
 
  491        if ($a_mode == 
"edit") {
 
  493            $ti->setValue($node->getTitle());
 
  494            $or->setValue($node->getOrderNr());
 
  498        if ($a_mode == 
"create") {
 
  499            $this->form->addCommandButton(
"saveTaxNode", 
$lng->txt(
"save"));
 
  500            $this->form->addCommandButton(
"listNodes", 
$lng->txt(
"cancel"));
 
  501            $this->form->setTitle(
$lng->txt(
"tax_new_tax_node"));
 
  503            $this->form->addCommandButton(
"updateTaxNode", 
$lng->txt(
"save"));
 
  504            $this->form->addCommandButton(
"listNodes", 
$lng->txt(
"cancel"));
 
  505            $this->form->setTitle(
$lng->txt(
"tax_edit_tax_node"));
 
  508        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
  522        if ($this->form->checkInput()) {
 
  526            include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  528            $node->setTitle($this->form->getInput(
"title"));
 
  532                $order_nr = $this->form->getInput(
"order_nr");
 
  534            if ($order_nr === 
"") {
 
  538            $node->setOrderNr($order_nr);
 
  539            $node->setTaxonomyId($tax->getId());
 
  547            ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  548            $ilCtrl->redirect($this, 
"listNodes");
 
  550            $this->form->setValuesByPost();
 
  551            $tpl->setContent($this->form->getHtml());
 
  566        if ($this->form->checkInput()) {
 
  569            $node->setTitle($this->form->getInput(
"title"));
 
  573                $node->setOrderNr($this->form->getInput(
"order_nr"));
 
  581            $this->form->setValuesByPost();
 
  582            $tpl->setContent($this->form->getHtml());
 
  597        if (!isset(
$_POST[
"id"])) {
 
  599            $ilCtrl->redirect($this, 
"listNodes");
 
  603        $ilHelp->setSubScreenId(
"del_items");
 
  607        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  610        $confirmation_gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  611        $confirmation_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  614        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  615        foreach (
$_POST[
"id"] as $id) {
 
  616            $confirmation_gui->addItem(
 
  623        $confirmation_gui->setCancel(
$lng->txt(
"cancel"), 
"listNodes");
 
  624        $confirmation_gui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
  626        $tpl->setContent($confirmation_gui->getHTML());
 
  636        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  639        foreach (
$_POST[
"id"] as $id) {
 
  642            $tax_tree = $tax->getTree();
 
  643            $node_data = $tax_tree->getNodeData($id);
 
  644            if (is_object($node)) {
 
  647            if ($tax_tree->isInTree($id)) {
 
  648                $tax_tree->deleteTree($node_data);
 
  656        $ilCtrl->redirect($this, 
"listNodes");
 
  671        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  672        if (is_array(
$_POST[
"order"])) {
 
  675            foreach (
$_POST[
"order"] as $k => $v) {
 
  682        if (is_array(
$_POST[
"title"])) {
 
  683            foreach (
$_POST[
"title"] as $k => $v) {
 
  692        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"));
 
  693        $ilCtrl->redirect($this, 
"listNodes");
 
  707        if (!isset(
$_POST[
"id"])) {
 
  709            $ilCtrl->redirect($this, 
"listNodes");
 
  713        $ilHelp->setSubScreenId(
"move_items");
 
  715        $ilToolbar->addButton(
 
  717            $ilCtrl->getLinkTarget($this, 
"listNodes")
 
  722        if (is_array(
$_POST[
"id"])) {
 
  723            $ilCtrl->setParameter($this, 
"move_ids", implode(
",", 
$_POST[
"id"]));
 
  730            include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
 
  738            if (!$tax_exp->handleCommand()) {
 
  740                $tpl->setContent($tax_exp->getHTML() . 
" ");
 
  754        if (
$_GET[
"move_ids"] != 
"") {
 
  755            $move_ids = explode(
",", 
$_GET[
"move_ids"]);
 
  757            $tree = $tax->getTree();
 
  759            include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
 
  761            foreach ($move_ids as $m_id) {
 
  764                if ($node->getTaxonomyId() == $tax->getId() &&
 
  765                    ($target_node->getTaxonomyId() == $tax->getId() ||
 
  766                    $target_node->getId() == 
$tree->readRootId())) {
 
  768                    if (
$tree->isGrandChild((
int) $m_id, $target_node->getId())) {
 
  770                        $this->ctrl->redirect($this, 
"listNodes");
 
  776                        $tree->moveTree((
int) $m_id, $target_node->getId());
 
  784        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  785        $ilCtrl->redirect($this, 
"listNodes");
 
  799        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  801        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  802        $cgui->setHeaderText(
$lng->txt(
"tax_confirm_deletion"));
 
  803        $cgui->setCancel(
$lng->txt(
"cancel"), 
"listTaxonomies");
 
  804        $cgui->setConfirm(
$lng->txt(
"delete"), 
"deleteTaxonomy");
 
  806        $cgui->addItem(
"id[]", 
$i, $tax->getTitle());
 
  808        $tpl->setContent($cgui->getHTML());
 
  825        ilUtil::sendSuccess(
$lng->txt(
"tax_tax_deleted"), 
true);
 
  826        $ilCtrl->redirect($this, 
"listTaxonomies");
 
  843        if (count($tax_ids) == 0 || $this->
getMultiple()) {
 
  844            $ilToolbar->addButton(
 
  845                $lng->txt(
"tax_add_taxonomy"),
 
  846                $ilCtrl->getLinkTarget($this, 
"createAssignedTaxonomy")
 
  852        include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
 
  877        $ilTabs->clearTargets();
 
  879        $ilHelp->setScreenIdComponent(
"tax");
 
  885        $ilTabs->setBackTarget(
 
  887            $ilCtrl->getLinkTarget($this, 
"listTaxonomies")
 
  892            $lng->txt(
"tax_nodes"),
 
  893            $ilCtrl->getLinkTarget($this, 
"listNodes")
 
  895        if ($this->assigned_item_sorting) {
 
  898                $lng->txt(
"tax_assigned_items"),
 
  899                $ilCtrl->getLinkTarget($this, 
"listAssignedItems")
 
  904            $lng->txt(
"settings"),
 
  905            $ilCtrl->getLinkTarget($this, 
"editSettings")
 
  908        $ilTabs->activateTab($a_id);
 
  924        $tpl->setContent($form->getHTML());
 
  937        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  942        $ti->setMaxLength(200);
 
  944        $ti->setValue($tax->getTitle());
 
  951        $ta->setValue($tax->getDescription());
 
  959        $si->setOptions($options);
 
  961        $si->setValue($tax->getSortingMode());
 
  964        if ($this->assigned_item_sorting) {
 
  966            $cb->setChecked($tax->getItemSorting());
 
  970        $form->addCommandButton(
"updateSettings", 
$lng->txt(
"save"));
 
  972        $form->setTitle(
$lng->txt(
"settings"));
 
  973        $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  988        if ($form->checkInput()) {
 
  990            $tax->setTitle($form->getInput(
"title"));
 
  991            $tax->setDescription($form->getInput(
"description"));
 
  992            $tax->setSortingMode($form->getInput(
"sorting"));
 
  993            $tax->setItemSorting($form->getInput(
"item_sorting"));
 
  996            ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  997            $ilCtrl->redirect($this, 
"editSettings");
 
  999            $form->setValuesByPost();
 
 1000            $tpl->setContent($form->getHtml());
 
 1025        include_once(
"./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
 
 1028            "listAssignedItems",
 
 1029            (
int) 
$_GET[
"tax_node"],
 
 1031            $this->assigned_item_comp_id,
 
 1032            $this->assigned_item_obj_id,
 
 1033            $this->assigned_item_type,
 
 1034            $this->assigned_item_info_obj
 
 1037        $tpl->setContent($table->getHTML());
 
 1051        include_once(
"./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
 
 1052        if (is_array(
$_POST[
"order"])) {
 
 1053            $order = 
$_POST[
"order"];
 
 1056            $tax_node = (int) 
$_GET[
"tax_node"];
 
 1057            foreach ($order as $a_item_id => $ord_nr) {
 
 1059                    $this->assigned_item_comp_id,
 
 1060                    $this->assigned_item_obj_id,
 
 1061                    $this->assigned_item_type,
 
 1064                $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
 
 1068                $this->assigned_item_comp_id,
 
 1069                $this->assigned_item_obj_id,
 
 1070                $this->assigned_item_type,
 
 1073            $tax_ass->fixOrderNr($tax_node);
 
 1074            ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
 1076        $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.
static getTreeHTML( $a_tax_id, $a_class, $a_cmd, $a_target_class, $a_target_cmd, $a_root_node_title="")
Get tree html.
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.
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 fixOrderNumbers($a_tax_id, $a_parent_id)
Fix order numbers.
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 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 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.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc