ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjTaxonomyGUI Class Reference

Taxonomy GUI class. More...

+ Inheritance diagram for ilObjTaxonomyGUI:
+ Collaboration diagram for ilObjTaxonomyGUI:

Public Member Functions

 __construct ($a_id=0)
 Execute command. More...
 
 getType ()
 Get type. More...
 
 setAssignedObject ($a_val)
 Set assigned object. More...
 
 getAssignedObject ()
 Get assigned object. More...
 
 setMultiple ($a_val)
 Set multiple. More...
 
 getMultiple ()
 Get multiple. More...
 
 setListInfo ($a_val)
 Set list info. More...
 
 getListInfo ()
 Get list info. More...
 
 activateAssignedItemSorting (ilTaxAssignedItemInfo $a_item_info_obj, $a_component_id, $a_obj_id, $a_item_type)
 Activate sorting mode of assigned objects. More...
 
 executeCommand ()
 Execute command. More...
 
 editAOTaxonomySettings ()
 
 getCurrentTaxonomyId ()
 Get current taxonomy id. More...
 
 getCurrentTaxonomy ()
 Get current taxonomy. More...
 
 listNodes ()
 List items. More...
 
 createAssignedTaxonomy ()
 Create assigned taxonomy. More...
 
 cancel ()
 Cancel creation. More...
 
 save ()
 Save taxonomy. More...
 
 showTree ($a_ass_items=false)
 Show Editing Tree. More...
 
 createTaxNode ()
 Create tax node. More...
 
 initTaxNodeForm ($a_mode="edit")
 Init tax node form. More...
 
 saveTaxNode ()
 Save tax node form. More...
 
 updateTaxNode ()
 Update tax node. More...
 
 deleteItems ()
 Confirm deletion screen for items. More...
 
 confirmedDelete ()
 Delete taxonomy nodes. More...
 
 saveSorting ()
 Save settings and sorting. More...
 
 moveItems ()
 Move items. More...
 
 pasteItems ()
 Paste items (move operation) More...
 
 confirmDeleteTaxonomy ()
 Confirm taxonomy deletion. More...
 
 deleteTaxonomy ()
 Delete taxonomy. More...
 
 listTaxonomies ()
 List taxonomies. More...
 
 setTabs ($a_id="")
 Set tabs. More...
 
 editSettings ()
 Edit settings. More...
 
 initSettingsForm ()
 Init form. More...
 
 updateSettings ()
 Update taxonomy settings. More...
 
 listAssignedItems ()
 List assigned items. More...
 
 saveAssignedItemsSorting ()
 Save assigned items sorting. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static getTreeHTML ( $a_tax_id, $a_class, $a_cmd, $a_target_class, $a_target_cmd, $a_root_node_title="")
 Get tree html. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 initCreationForms ($a_new_type)
 Init creation forms. More...
 
 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. More...
 
 afterSave (ilObject $a_new_object)
 After saving,. More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $tabs
 
 $help
 
 $multiple = false
 
 $assigned_item_sorting = false
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Taxonomy GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilObjTaxonomyGUI:

Definition at line 18 of file class.ilObjTaxonomyGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjTaxonomyGUI::__construct (   $a_id = 0)

Execute command.

Definition at line 36 of file class.ilObjTaxonomyGUI.php.

37 {
38 global $DIC;
39
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"];
47 $ilCtrl = $DIC->ctrl();
48 $lng = $DIC->language();
49
50 parent::__construct($a_id, ilObject2GUI::OBJECT_ID);
51
52 $ilCtrl->saveParameter($this, "tax_node");
53 $ilCtrl->saveParameter($this, "tax_id");
54
55 $lng->loadLanguageModule("tax");
56 }
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilObject2GUI\OBJECT_ID, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateAssignedItemSorting()

ilObjTaxonomyGUI::activateAssignedItemSorting ( ilTaxAssignedItemInfo  $a_item_info_obj,
  $a_component_id,
  $a_obj_id,
  $a_item_type 
)

Activate sorting mode of assigned objects.

Parameters
object$a_item_info_objinformation object of assigned items

Definition at line 133 of file class.ilObjTaxonomyGUI.php.

134 {
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;
140 }

◆ afterSave()

ilObjTaxonomyGUI::afterSave ( ilObject  $a_new_object)
protected

After saving,.

Parameters

return

Reimplemented from ilObjectGUI.

Definition at line 347 of file class.ilObjTaxonomyGUI.php.

348 {
351
352 if ($this->getAssignedObject() > 0) {
354 $a_new_object->getId(),
355 $this->getAssignedObject()
356 );
357 $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
358 ilUtil::sendSuccess($lng->txt("tax_added"), true);
359 $ilCtrl->redirect($this, "editSettings");
360 }
361 }
getAssignedObject()
Get assigned object.
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.
getId()
get object id @access public
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, getAssignedObject(), ilObject\getId(), ilObjTaxonomy\saveUsage(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ cancel()

ilObjTaxonomyGUI::cancel ( )

Cancel creation.

Parameters

return

Reimplemented from ilObject2GUI.

Definition at line 313 of file class.ilObjTaxonomyGUI.php.

314 {
316
317 if ($this->getAssignedObject() > 0) {
318 $ilCtrl->redirect($this, "listTaxonomies");
319 }
320
321 return parent::cancel();
322 }

References ilObjectGUI\$ctrl, $ilCtrl, and getAssignedObject().

+ Here is the call graph for this function:

◆ checkPermissionBool()

ilObjTaxonomyGUI::checkPermissionBool (   $a_perm,
  $a_cmd = "",
  $a_type = "",
  $a_node_id = null 
)
protected

If we run under an assigned object, the permission should be checked on the upper level.

Reimplemented from ilObject2GUI.

Definition at line 298 of file class.ilObjTaxonomyGUI.php.

299 {
300 if ($this->getAssignedObject() > 0) {
301 return true;
302 } else {
303 return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_node_id);
304 }
305 }
$a_type
Definition: workflow.php:92

References $a_type, and getAssignedObject().

+ Here is the call graph for this function:

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

Definition at line 768 of file class.ilObjTaxonomyGUI.php.

769 {
773
774 $tax = $this->getCurrentTaxonomy();
775
776 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
777 $cgui = new ilConfirmationGUI();
778 $cgui->setFormAction($ilCtrl->getFormAction($this));
779 $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
780 $cgui->setCancel($lng->txt("cancel"), "listTaxonomies");
781 $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
782
783 $cgui->addItem("id[]", $i, $tax->getTitle());
784
785 $tpl->setContent($cgui->getHTML());
786 }
Confirmation screen class.
getCurrentTaxonomy()
Get current taxonomy.
$i
Definition: disco.tpl.php:19

References ilObjectGUI\$ctrl, $i, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, and getCurrentTaxonomy().

+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjTaxonomyGUI::confirmedDelete ( )

Delete taxonomy nodes.

Reimplemented from ilObject2GUI.

Definition at line 609 of file class.ilObjTaxonomyGUI.php.

610 {
612
613 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
614
615 // delete all selected objects
616 foreach ($_POST["id"] as $id) {
617 $node = new ilTaxonomyNode($id);
618 $tax = new ilObjTaxonomy($node->getTaxonomyId());
619 $tax_tree = $tax->getTree();
620 $node_data = $tax_tree->getNodeData($id);
621 if (is_object($node)) {
622 $node->delete();
623 }
624 if ($tax_tree->isInTree($id)) {
625 $tax_tree->deleteTree($node_data);
626 }
627 ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
628 }
629
630 // feedback
631 ilUtil::sendInfo($this->lng->txt("info_deleted"), true);
632
633 $ilCtrl->redirect($this, "listNodes");
634 }
$_POST["username"]
static fixOrderNumbers($a_tax_id, $a_parent_id)
Fix order numbers.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id

References $_POST, ilObjectGUI\$ctrl, $id, $ilCtrl, ilTaxonomyNode\fixOrderNumbers(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ createAssignedTaxonomy()

ilObjTaxonomyGUI::createAssignedTaxonomy ( )

Create assigned taxonomy.

Parameters

return

Definition at line 288 of file class.ilObjTaxonomyGUI.php.

289 {
290 $this->create();
291 }
create()
Deleted in ilObject.

References ilObject2GUI\create().

+ Here is the call graph for this function:

◆ createTaxNode()

ilObjTaxonomyGUI::createTaxNode ( )

Create tax node.

Parameters

return

Definition at line 429 of file class.ilObjTaxonomyGUI.php.

430 {
432 $ilHelp = $this->help;
433
434 $this->setTabs("list_items");
435 $ilHelp->setSubScreenId("create_node");
436
437 $this->initTaxNodeForm("create");
438 $tpl->setContent($this->form->getHTML());
439 }
initTaxNodeForm($a_mode="edit")
Init tax node form.
setTabs()
create tabs (repository/workspace switch)

References $help, ilObjectGUI\$tpl, initTaxNodeForm(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ deleteItems()

ilObjTaxonomyGUI::deleteItems ( )

Confirm deletion screen for items.

Definition at line 566 of file class.ilObjTaxonomyGUI.php.

567 {
571 $ilTabs = $this->tabs;
572 $ilHelp = $this->help;
573
574 if (!isset($_POST["id"])) {
575 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
576 $ilCtrl->redirect($this, "listNodes");
577 }
578
579 $this->setTabs("list_items");
580 $ilHelp->setSubScreenId("del_items");
581
582 // $ilTabs->clearTargets();
583
584 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
585 $confirmation_gui = new ilConfirmationGUI();
586
587 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
588 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
589
590 // Add items to delete
591 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
592 foreach ($_POST["id"] as $id) {
593 $confirmation_gui->addItem(
594 "id[]",
595 $id,
597 );
598 }
599
600 $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
601 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
602
603 $tpl->setContent($confirmation_gui->getHTML());
604 }
static _lookupTitle($a_obj_id)
Lookup Title.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $_POST, ilObjectGUI\$ctrl, $help, $id, $ilCtrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilTaxonomyNode\_lookupTitle(), ilUtil\sendFailure(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ deleteTaxonomy()

ilObjTaxonomyGUI::deleteTaxonomy ( )

Delete taxonomy.

Parameters

return

Definition at line 794 of file class.ilObjTaxonomyGUI.php.

795 {
798
799 $tax = $this->getCurrentTaxonomy();
800 $tax->delete();
801
802 ilUtil::sendSuccess($lng->txt("tax_tax_deleted"), true);
803 $ilCtrl->redirect($this, "listTaxonomies");
804 }

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, getCurrentTaxonomy(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ editAOTaxonomySettings()

ilObjTaxonomyGUI::editAOTaxonomySettings ( )
Parameters

return

Definition at line 185 of file class.ilObjTaxonomyGUI.php.

186 {
187 $ilToolbar = $this->toolbar;
190
191
192 // if (count($tax_ids) != 0 && !$this->getMultiple())
193 // {
194 // $this->listNodes();
195 // }
196 // else if ($this->getMultiple())
197 // {
198 $this->listTaxonomies();
199 // }
200
201 // currently we support only one taxonomy, otherwise we may need to provide
202 // a list here
203 }
listTaxonomies()
List taxonomies.

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$toolbar, and listTaxonomies().

+ Here is the call graph for this function:

◆ editSettings()

ilObjTaxonomyGUI::editSettings ( )

Edit settings.

Parameters

return

Definition at line 895 of file class.ilObjTaxonomyGUI.php.

896 {
898
899 $this->setTabs("settings");
900
901 $form = $this->initSettingsForm();
902 $tpl->setContent($form->getHTML());
903 }
if(isset($_POST['submit'])) $form

References $form, ilObjectGUI\$tpl, initSettingsForm(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjTaxonomyGUI::executeCommand ( )

Execute command.

Reimplemented from ilObject2GUI.

Definition at line 146 of file class.ilObjTaxonomyGUI.php.

147 {
150 $ilTabs = $this->tabs;
151
152 $next_class = $ilCtrl->getNextClass();
153
154 switch ($next_class) {
155 default:
156 $cmd = $ilCtrl->getCmd("listTaxonomies");
157 $this->$cmd();
158 break;
159 }
160 }
$ilUser
Definition: imgupload.php:18

References ilObjectGUI\$ctrl, $ilCtrl, $ilUser, $tabs, and ilObjectGUI\$user.

◆ getAssignedObject()

ilObjTaxonomyGUI::getAssignedObject ( )

Get assigned object.

Returns
int object id

Definition at line 83 of file class.ilObjTaxonomyGUI.php.

84 {
85 return $this->assigned_object_id;
86 }

Referenced by afterSave(), cancel(), checkPermissionBool(), getCurrentTaxonomyId(), listTaxonomies(), and save().

+ Here is the caller graph for this function:

◆ getCurrentTaxonomy()

ilObjTaxonomyGUI::getCurrentTaxonomy ( )

Get current taxonomy.

Parameters

return

Definition at line 228 of file class.ilObjTaxonomyGUI.php.

229 {
230 $tax_id = $this->getCurrentTaxonomyId();
231 if ($tax_id > 0) {
232 $tax = new ilObjTaxonomy($tax_id);
233 return $tax;
234 }
235
236 return false;
237 }
getCurrentTaxonomyId()
Get current taxonomy id.

References getCurrentTaxonomyId().

Referenced by confirmDeleteTaxonomy(), deleteTaxonomy(), initSettingsForm(), initTaxNodeForm(), listAssignedItems(), listNodes(), moveItems(), pasteItems(), saveTaxNode(), showTree(), updateSettings(), and updateTaxNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentTaxonomyId()

ilObjTaxonomyGUI::getCurrentTaxonomyId ( )

Get current taxonomy id.

Parameters

return

Definition at line 211 of file class.ilObjTaxonomyGUI.php.

212 {
214 $tax_id = (int) $_GET["tax_id"];
215 if (in_array($tax_id, $tax_ids)) {
216 return $tax_id;
217 }
218 return false;
219 }
$_GET["client_id"]
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.

References $_GET, getAssignedObject(), and ilObjTaxonomy\getUsageOfObject().

Referenced by getCurrentTaxonomy(), saveAssignedItemsSorting(), saveSorting(), and setTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getListInfo()

ilObjTaxonomyGUI::getListInfo ( )

Get list info.

Returns
string

Definition at line 123 of file class.ilObjTaxonomyGUI.php.

124 {
125 return $this->list_info;
126 }

Referenced by listTaxonomies().

+ Here is the caller graph for this function:

◆ getMultiple()

ilObjTaxonomyGUI::getMultiple ( )

Get multiple.

Returns
bool multiple

Definition at line 103 of file class.ilObjTaxonomyGUI.php.

104 {
105 return $this->multiple;
106 }

References $multiple.

Referenced by listTaxonomies().

+ Here is the caller graph for this function:

◆ getTreeHTML()

static ilObjTaxonomyGUI::getTreeHTML (   $a_tax_id,
  $a_class,
  $a_cmd,
  $a_target_class,
  $a_target_cmd,
  $a_root_node_title = "" 
)
static

Get tree html.

Parameters

return

Definition at line 399 of file class.ilObjTaxonomyGUI.php.

406 {
407 die("ilObjTaxonomyGUI::getTreeHTML is deprecated.");
408 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
409 $tax_exp = new ilTaxonomyExplorerGUI(
410 $a_class,
411 $a_cmd,
412 $a_tax_id,
413 $a_target_class,
414 $a_target_cmd
415 );
416 if (!$tax_exp->handleCommand()) {
417 return $tax_exp->getHTML() . " ";
418 }
419 return;
420 }
Taxonomy explorer GUI class.

Referenced by ilGlossaryPresentationGUI\showTaxonomy().

+ Here is the caller graph for this function:

◆ getType()

ilObjTaxonomyGUI::getType ( )

Get type.

Returns
string type

Reimplemented from ilObject2GUI.

Definition at line 63 of file class.ilObjTaxonomyGUI.php.

64 {
65 return "tax";
66 }

◆ initCreationForms()

ilObjTaxonomyGUI::initCreationForms (   $a_new_type)
protected

Init creation forms.

Reimplemented from ilObject2GUI.

Definition at line 165 of file class.ilObjTaxonomyGUI.php.

166 {
167 $forms = array(
168 self::CFORM_NEW => $this->initCreateForm("tax")
169 );
170
171 return $forms;
172 }
initCreateForm($a_new_type)
Init object creation form.

References ilObjectGUI\initCreateForm().

+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjTaxonomyGUI::initSettingsForm ( )

Init form.

Definition at line 908 of file class.ilObjTaxonomyGUI.php.

909 {
912
913 $tax = $this->getCurrentTaxonomy();
914
915 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
916 $form = new ilPropertyFormGUI();
917
918 // title
919 $ti = new ilTextInputGUI($lng->txt("title"), "title");
920 $ti->setMaxLength(200);
921 $form->addItem($ti);
922 $ti->setValue($tax->getTitle());
923
924 // description
925 $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
926 //$ta->setCols();
927 //$ta->setRows();
928 $form->addItem($ta);
929 $ta->setValue($tax->getDescription());
930
931 // sorting
932 $options = array(
933 ilObjTaxonomy::SORT_ALPHABETICAL => $lng->txt("tax_alphabetical"),
934 ilObjTaxonomy::SORT_MANUAL => $lng->txt("tax_manual")
935 );
936 $si = new ilSelectInputGUI($lng->txt("tax_node_sorting"), "sorting");
937 $si->setOptions($options);
938 $form->addItem($si);
939 $si->setValue($tax->getSortingMode());
940
941 // assigned item sorting
942 if ($this->assigned_item_sorting) {
943 $cb = new ilCheckboxInputGUI($lng->txt("tax_item_sorting"), "item_sorting");
944 $cb->setChecked($tax->getItemSorting());
945 $form->addItem($cb);
946 }
947
948 $form->addCommandButton("updateSettings", $lng->txt("save"));
949
950 $form->setTitle($lng->txt("settings"));
951 $form->setFormAction($ilCtrl->getFormAction($this));
952
953 return $form;
954 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
This class represents a checkbox property in a property form.
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObjectGUI\$ctrl, $form, $ilCtrl, ilObjectGUI\$lng, $options, $si, getCurrentTaxonomy(), ilObjTaxonomy\SORT_ALPHABETICAL, and ilObjTaxonomy\SORT_MANUAL.

Referenced by editSettings(), and updateSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTaxNodeForm()

ilObjTaxonomyGUI::initTaxNodeForm (   $a_mode = "edit")

Init tax node form.

Parameters
int$a_modeEdit Mode

Definition at line 447 of file class.ilObjTaxonomyGUI.php.

448 {
451
452 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
453 $this->form = new ilPropertyFormGUI();
454
455 // title
456 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
457 $this->form->addItem($ti);
458
459 // order nr
460 $tax = $this->getCurrentTaxonomy();
461 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
462 $or = new ilTextInputGUI($this->lng->txt("tax_order_nr"), "order_nr");
463 $or->setMaxLength(5);
464 $or->setSize(5);
465 $this->form->addItem($or);
466 }
467
468 if ($a_mode == "edit") {
469 $node = new ilTaxonomyNode((int) $_GET["tax_node"]);
470 $ti->setValue($node->getTitle());
471 $or->setValue($node->getOrderNr());
472 }
473
474 // save and cancel commands
475 if ($a_mode == "create") {
476 $this->form->addCommandButton("saveTaxNode", $lng->txt("save"));
477 $this->form->addCommandButton("listNodes", $lng->txt("cancel"));
478 $this->form->setTitle($lng->txt("tax_new_tax_node"));
479 } else {
480 $this->form->addCommandButton("updateTaxNode", $lng->txt("save"));
481 $this->form->addCommandButton("listNodes", $lng->txt("cancel"));
482 $this->form->setTitle($lng->txt("tax_edit_tax_node"));
483 }
484
485 $this->form->setFormAction($ilCtrl->getFormAction($this));
486 }

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, getCurrentTaxonomy(), and ilObjTaxonomy\SORT_MANUAL.

Referenced by createTaxNode(), saveTaxNode(), and updateTaxNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listAssignedItems()

ilObjTaxonomyGUI::listAssignedItems ( )

List assigned items.

Parameters

return

Definition at line 988 of file class.ilObjTaxonomyGUI.php.

989 {
991 $ilToolbar = $this->toolbar;
994
995 $tax = $this->getCurrentTaxonomy();
996
997 $this->setTabs("ass_items");
998
999 // show tree
1000 $this->showTree(true);
1001
1002 // list assigned items
1003 include_once("./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
1005 $this,
1006 "listAssignedItems",
1007 (int) $_GET["tax_node"],
1008 $this->getCurrentTaxonomy(),
1009 $this->assigned_item_comp_id,
1010 $this->assigned_item_obj_id,
1011 $this->assigned_item_type,
1012 $this->assigned_item_info_obj
1013 );
1014
1015 $tpl->setContent($table->getHTML());
1016 }
showTree($a_ass_items=false)
Show Editing Tree.
TableGUI class for taxonomy list.
if(empty($password)) $table
Definition: pwgen.php:24

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $table, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, getCurrentTaxonomy(), ilObject2GUI\setTabs(), and showTree().

+ Here is the call graph for this function:

◆ listNodes()

ilObjTaxonomyGUI::listNodes ( )

List items.

Parameters

return

Definition at line 246 of file class.ilObjTaxonomyGUI.php.

247 {
249 $ilToolbar = $this->toolbar;
252
253 $tax = $this->getCurrentTaxonomy();
254
255 $this->setTabs("list_items");
256
257 // show toolbar
258 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
259 $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
260
261 $ilToolbar->setCloseFormTag(false);
262
263
264 // show tree
265 $this->showTree();
266
267 // show subitems
268 include_once("./Services/Taxonomy/classes/class.ilTaxonomyTableGUI.php");
270 $this,
271 "listNodes",
272 $tax->getTree(),
273 (int) $_GET["tax_node"],
274 $this->getCurrentTaxonomy()
275 );
276 $table->setOpenFormTag(false);
277
278 $tpl->setContent($table->getHTML());
279 }
TableGUI class for taxonomies.

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $table, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, getCurrentTaxonomy(), ilObject2GUI\setTabs(), and showTree().

+ Here is the call graph for this function:

◆ listTaxonomies()

ilObjTaxonomyGUI::listTaxonomies ( )

List taxonomies.

Parameters

return

Definition at line 812 of file class.ilObjTaxonomyGUI.php.

813 {
815 $ilToolbar = $this->toolbar;
818
820 if (count($tax_ids) == 0 || $this->getMultiple()) {
821 $ilToolbar->addButton(
822 $lng->txt("tax_add_taxonomy"),
823 $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy")
824 );
825 } else {
826 ilUtil::sendInfo($lng->txt("tax_max_one_tax"));
827 }
828
829 include_once("./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
830
832 $this,
833 "listTaxonomies",
834 $this->getAssignedObject(),
835 $this->getListInfo()
836 );
837
838 $tpl->setContent($tab->getHTML());
839 }
getListInfo()
Get list info.
TableGUI class for taxonomy list.

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tab, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, getAssignedObject(), getListInfo(), getMultiple(), ilObjTaxonomy\getUsageOfObject(), and ilUtil\sendInfo().

Referenced by editAOTaxonomySettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItems()

ilObjTaxonomyGUI::moveItems ( )

Move items.

Definition at line 676 of file class.ilObjTaxonomyGUI.php.

677 {
681 $ilToolbar = $this->toolbar;
682 $ilHelp = $this->help;
683
684 if (!isset($_POST["id"])) {
685 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
686 $ilCtrl->redirect($this, "listNodes");
687 }
688
689 $this->setTabs("list_items");
690 $ilHelp->setSubScreenId("move_items");
691
692 $ilToolbar->addButton(
693 $lng->txt("cancel"),
694 $ilCtrl->getLinkTarget($this, "listNodes")
695 );
696
697 ilUtil::sendInfo($lng->txt("tax_please_select_target"));
698
699 if (is_array($_POST["id"])) {
700 $ilCtrl->setParameter($this, "move_ids", implode($_POST["id"], ","));
701
706
707 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
708 $tax_exp = new ilTaxonomyExplorerGUI(
709 $this,
710 "moveItems",
711 $this->getCurrentTaxonomy()->getId(),
712 "ilobjtaxonomygui",
713 "pasteItems"
714 );
715 if (!$tax_exp->handleCommand()) {
716 //$tpl->setLeftNavContent($tax_exp->getHTML());
717 $tpl->setContent($tax_exp->getHTML() . " ");
718 }
719 }
720 }

References $_POST, ilObjectGUI\$ctrl, $help, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\$user, getCurrentTaxonomy(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilObject2GUI\setTabs().

+ Here is the call graph for this function:

◆ pasteItems()

ilObjTaxonomyGUI::pasteItems ( )

Paste items (move operation)

Definition at line 725 of file class.ilObjTaxonomyGUI.php.

726 {
729 //var_dump($_GET);
730 //var_dump($_POST);
731 if ($_GET["move_ids"] != "") {
732 $move_ids = explode(",", $_GET["move_ids"]);
733 $tax = $this->getCurrentTaxonomy();
734 $tree = $tax->getTree();
735
736 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
737 $target_node = new ilTaxonomyNode((int) $_GET["tax_node"]);
738 foreach ($move_ids as $m_id) {
739 // cross check taxonomy
740 $node = new ilTaxonomyNode((int) $m_id);
741 if ($node->getTaxonomyId() == $tax->getId() &&
742 ($target_node->getTaxonomyId() == $tax->getId() ||
743 $target_node->getId() == $tree->readRootId())) {
744 // check if target is not within the selected nodes
745 if ($tree->isGrandChild((int) $m_id, $target_node->getId())) {
746 ilUtil::sendFailure($lng->txt("tax_target_within_nodes"), true);
747 $this->ctrl->redirect($this, "listNodes");
748 }
749
750 // if target is not current place, move
751 $parent_id = $tree->getParentId((int) $m_id);
752 if ($parent_id != $target_node->getId()) {
753 $tree->moveTree((int) $m_id, $target_node->getId());
754 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
756 }
757 }
758 }
759 }
760
761 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
762 $ilCtrl->redirect($this, "listNodes");
763 }

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObject2GUI\$parent_id, ilObject2GUI\$tree, ilTaxonomyNode\fixOrderNumbers(), getCurrentTaxonomy(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ save()

ilObjTaxonomyGUI::save ( )

Save taxonomy.

Parameters

return

Reimplemented from ilObject2GUI.

Definition at line 330 of file class.ilObjTaxonomyGUI.php.

331 {
333
334 if ($this->getAssignedObject() > 0) {
335 $_REQUEST["new_type"] = "tax";
336 }
337
338 parent::saveObject();
339 }

References ilObjectGUI\$ctrl, $ilCtrl, and getAssignedObject().

+ Here is the call graph for this function:

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

Parameters

return

Definition at line 1024 of file class.ilObjTaxonomyGUI.php.

1025 {
1026 $lng = $this->lng;
1028
1029 include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
1030 if (is_array($_POST["order"])) {
1031 $order = $_POST["order"];
1032 //asort($order, SORT_NUMERIC);
1033 //$cnt = 10;
1034 $tax_node = (int) $_GET["tax_node"];
1035 foreach ($order as $a_item_id => $ord_nr) {
1036 $tax_ass = new ilTaxNodeAssignment(
1037 $this->assigned_item_comp_id,
1038 $this->assigned_item_obj_id,
1039 $this->assigned_item_type,
1040 $this->getCurrentTaxonomyId()
1041 );
1042 $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
1043 //$cnt+= 10;
1044 }
1045 $tax_ass = new ilTaxNodeAssignment(
1046 $this->assigned_item_comp_id,
1047 $this->assigned_item_obj_id,
1048 $this->assigned_item_type,
1049 $this->getCurrentTaxonomyId()
1050 );
1051 $tax_ass->fixOrderNr($tax_node);
1052 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1053 }
1054 $ilCtrl->redirect($this, "listAssignedItems");
1055 }
Taxonomy node <-> item assignment.

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, getCurrentTaxonomyId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveSorting()

ilObjTaxonomyGUI::saveSorting ( )

Save settings and sorting.

Parameters

return

Definition at line 642 of file class.ilObjTaxonomyGUI.php.

643 {
646
647 // save sorting
648 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
649 if (is_array($_POST["order"])) {
650 // asort($_POST["order"]);
651 // $cnt = 10;
652 foreach ($_POST["order"] as $k => $v) {
654 }
656 }
657
658 // save titles
659 if (is_array($_POST["title"])) {
660 foreach ($_POST["title"] as $k => $v) {
662 (int) $k,
664 );
665 }
666 }
667
668
669 ilUtil::sendSuccess($lng->txt("msg_obj_modified"));
670 $ilCtrl->redirect($this, "listNodes");
671 }
static writeOrderNr($a_node_id, $a_order_nr)
Write order nr.
static writeTitle($a_node_id, $a_title)
Write title.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_GET, $_POST, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilTaxonomyNode\fixOrderNumbers(), getCurrentTaxonomyId(), ilUtil\sendSuccess(), ilUtil\stripSlashes(), ilTaxonomyNode\writeOrderNr(), and ilTaxonomyNode\writeTitle().

+ Here is the call graph for this function:

◆ saveTaxNode()

ilObjTaxonomyGUI::saveTaxNode ( )

Save tax node form.

Definition at line 492 of file class.ilObjTaxonomyGUI.php.

493 {
497
498 $this->initTaxNodeForm("create");
499 if ($this->form->checkInput()) {
500 $tax = $this->getCurrentTaxonomy();
501
502 // create node
503 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
504 $node = new ilTaxonomyNode();
505 $node->setTitle($this->form->getInput("title"));
506
507 $tax = $this->getCurrentTaxonomy();
508 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
509 $order_nr = $this->form->getInput("order_nr");
510 }
511 if ($order_nr === "") {
512 $order_nr = ilTaxonomyNode::getNextOrderNr($tax->getId(), (int) $_GET["tax_node"]);
513 }
514 //echo $order_nr; exit;
515 $node->setOrderNr($order_nr);
516 $node->setTaxonomyId($tax->getId());
517 $node->create();
518
519 // put in tree
520 ilTaxonomyNode::putInTree($tax->getId(), $node, (int) $_GET["tax_node"]);
521
522 ilTaxonomyNode::fixOrderNumbers($tax->getId(), (int) $_GET["tax_node"]);
523
524 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
525 $ilCtrl->redirect($this, "listNodes");
526 } else {
527 $this->form->setValuesByPost();
528 $tpl->setContent($this->form->getHtml());
529 }
530 }
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 getNextOrderNr($a_tax_id, $a_parent_id)
Put this node into the taxonomy tree.

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilTaxonomyNode\fixOrderNumbers(), getCurrentTaxonomy(), ilTaxonomyNode\getNextOrderNr(), initTaxNodeForm(), ilTaxonomyNode\putInTree(), ilUtil\sendSuccess(), and ilObjTaxonomy\SORT_MANUAL.

+ Here is the call graph for this function:

◆ setAssignedObject()

ilObjTaxonomyGUI::setAssignedObject (   $a_val)

Set assigned object.

Parameters
int$a_valobject id

Definition at line 73 of file class.ilObjTaxonomyGUI.php.

74 {
75 $this->assigned_object_id = $a_val;
76 }

◆ setListInfo()

ilObjTaxonomyGUI::setListInfo (   $a_val)

Set list info.

Parameters
string$a_val

Definition at line 113 of file class.ilObjTaxonomyGUI.php.

114 {
115 $this->list_info = trim($a_val);
116 }

◆ setMultiple()

ilObjTaxonomyGUI::setMultiple (   $a_val)

Set multiple.

Parameters
bool$a_valmultiple

Definition at line 93 of file class.ilObjTaxonomyGUI.php.

94 {
95 $this->multiple = $a_val;
96 }

◆ setTabs()

ilObjTaxonomyGUI::setTabs (   $a_id = "")

Set tabs.

Parameters
$a_idstring tab id to be activated

Definition at line 846 of file class.ilObjTaxonomyGUI.php.

847 {
848 $ilTabs = $this->tabs;
852 $ilHelp = $this->help;
853
854 $ilTabs->clearTargets();
855
856 $ilHelp->setScreenIdComponent("tax");
857
858 $tpl->clearHeader();
860 $tpl->setDescription(ilObject::_lookupDescription($this->getCurrentTaxonomyId()));
861 $tpl->setTitleIcon(ilUtil::getImagePath("icon_tax.svg"));
862
863 $ilTabs->setBackTarget(
864 $lng->txt("back"),
865 $ilCtrl->getLinkTarget($this, "listTaxonomies")
866 );
867
868 $ilTabs->addTab(
869 "list_items",
870 $lng->txt("tax_nodes"),
871 $ilCtrl->getLinkTarget($this, "listNodes")
872 );
873 if ($this->assigned_item_sorting) {
874 $ilTabs->addTab(
875 "ass_items",
876 $lng->txt("tax_assigned_items"),
877 $ilCtrl->getLinkTarget($this, "listAssignedItems")
878 );
879 }
880 $ilTabs->addTab(
881 "settings",
882 $lng->txt("settings"),
883 $ilCtrl->getLinkTarget($this, "editSettings")
884 );
885
886 $ilTabs->activateTab($a_id);
887 }
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilObjectGUI\$ctrl, $help, $ilCtrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObject\_lookupDescription(), ilObject\_lookupTitle(), getCurrentTaxonomyId(), and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ showTree()

ilObjTaxonomyGUI::showTree (   $a_ass_items = false)

Show Editing Tree.

Definition at line 366 of file class.ilObjTaxonomyGUI.php.

367 {
372
373 $tax = $this->getCurrentTaxonomy();
374
375 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
376 $cmd = $a_ass_items
377 ? "listAssignedItems"
378 : "listNodes";
379 $tax_exp = new ilTaxonomyExplorerGUI(
380 $this,
381 "showTree",
382 $tax->getId(),
383 "ilobjtaxonomygui",
384 $cmd
385 );
386 if (!$tax_exp->handleCommand()) {
387 //$tpl->setLeftNavContent($tax_exp->getHTML());
388 $tpl->setLeftContent($tax_exp->getHTML() . "&nbsp;");
389 }
390 return;
391 }

References ilObjectGUI\$ctrl, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjectGUI\$user, and getCurrentTaxonomy().

Referenced by listAssignedItems(), and listNodes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSettings()

ilObjTaxonomyGUI::updateSettings ( )

Update taxonomy settings.

Definition at line 959 of file class.ilObjTaxonomyGUI.php.

960 {
964
965 $form = $this->initSettingsForm();
966 if ($form->checkInput()) {
967 $tax = $this->getCurrentTaxonomy();
968 $tax->setTitle($form->getInput("title"));
969 $tax->setDescription($form->getInput("description"));
970 $tax->setSortingMode($form->getInput("sorting"));
971 $tax->setItemSorting($form->getInput("item_sorting"));
972 $tax->update();
973
974 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
975 $ilCtrl->redirect($this, "editSettings");
976 } else {
977 $form->setValuesByPost();
978 $tpl->setContent($form->getHtml());
979 }
980 }

References ilObjectGUI\$ctrl, $form, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, getCurrentTaxonomy(), initSettingsForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ updateTaxNode()

ilObjTaxonomyGUI::updateTaxNode ( )

Update tax node.

Definition at line 536 of file class.ilObjTaxonomyGUI.php.

537 {
541
542 $this->initTaxNodeForm("edit");
543 if ($this->form->checkInput()) {
544 // create node
545 $node = new ilTaxonomyNode($_GET["tax_node"]);
546 $node->setTitle($this->form->getInput("title"));
547
548 $tax = $this->getCurrentTaxonomy();
549 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
550 $node->setOrderNr($this->form->getInput("order_nr"));
551 }
552
553 $node->update();
554
555 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
556 $ilCtrl->redirect($this, "");
557 } else {
558 $this->form->setValuesByPost();
559 $tpl->setContent($this->form->getHtml());
560 }
561 }

References $_GET, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, getCurrentTaxonomy(), initTaxNodeForm(), ilUtil\sendInfo(), and ilObjTaxonomy\SORT_MANUAL.

+ Here is the call graph for this function:

Field Documentation

◆ $assigned_item_sorting

ilObjTaxonomyGUI::$assigned_item_sorting = false
protected

Definition at line 31 of file class.ilObjTaxonomyGUI.php.

◆ $help

ilObjTaxonomyGUI::$help
protected

Definition at line 28 of file class.ilObjTaxonomyGUI.php.

Referenced by createTaxNode(), deleteItems(), moveItems(), and setTabs().

◆ $multiple

ilObjTaxonomyGUI::$multiple = false
protected

Definition at line 30 of file class.ilObjTaxonomyGUI.php.

Referenced by getMultiple().

◆ $tabs

ilObjTaxonomyGUI::$tabs
protected

Definition at line 23 of file class.ilObjTaxonomyGUI.php.

Referenced by deleteItems(), executeCommand(), and setTabs().


The documentation for this class was generated from the following file: