ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
- 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...
 
 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...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. 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)
 Activate rating automatically if parent container setting. More...
 
- 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...
 
 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...
 
 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

 $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
 $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
 
 $ilias
 
 $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 26 of file class.ilObjTaxonomyGUI.php.

27 {
28 global $ilCtrl, $lng;
29
30 parent::__construct($a_id, ilObject2GUI::OBJECT_ID);
31
32 $ilCtrl->saveParameter($this, "tax_node");
33 $ilCtrl->saveParameter($this, "tax_id");
34
35 $lng->loadLanguageModule("tax");
36 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, ilObjectGUI\$lng, and ilObject2GUI\OBJECT_ID.

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 113 of file class.ilObjTaxonomyGUI.php.

114 {
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;
120 }

◆ afterSave()

ilObjTaxonomyGUI::afterSave ( ilObject  $a_new_object)
protected

After saving,.

Parameters

return

Reimplemented from ilObjectGUI.

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

325 {
326 global $ilCtrl, $lng;
327
328 if ($this->getAssignedObject() > 0)
329 {
330 ilObjTaxonomy::saveUsage($a_new_object->getId(),
331 $this->getAssignedObject());
332 $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
333 ilUtil::sendSuccess($lng->txt("tax_added"), true);
334 $ilCtrl->redirect($this, "editSettings");
335 }
336 }
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 $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 288 of file class.ilObjTaxonomyGUI.php.

289 {
290 global $ilCtrl;
291
292 if ($this->getAssignedObject() > 0)
293 {
294 $ilCtrl->redirect($this, "listTaxonomies");
295 }
296
297 return parent::cancel();
298 }

References $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 270 of file class.ilObjTaxonomyGUI.php.

271 {
272 if ($this->getAssignedObject() > 0)
273 {
274 return true;
275 }
276 else
277 {
278 return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_node_id);
279 }
280 }
$a_type
Definition: workflow.php:93

References $a_type, and getAssignedObject().

+ Here is the call graph for this function:

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

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

729 {
730 global $ilCtrl, $tpl, $lng;
731
732 $tax = $this->getCurrentTaxonomy();
733
734 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
735 $cgui = new ilConfirmationGUI();
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");
740
741 $cgui->addItem("id[]", $i, $tax->getTitle());
742
743 $tpl->setContent($cgui->getHTML());
744 }
Confirmation screen class.
getCurrentTaxonomy()
Get current taxonomy.

References $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 572 of file class.ilObjTaxonomyGUI.php.

573 {
574 global $ilCtrl;
575
576 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
577
578 // delete all selected objects
579 foreach ($_POST["id"] as $id)
580 {
581 $node = new ilTaxonomyNode($id);
582 $tax = new ilObjTaxonomy($node->getTaxonomyId());
583 $tax_tree = $tax->getTree();
584 $node_data = $tax_tree->getNodeData($id);
585 if (is_object($node))
586 {
587 $node->delete();
588 }
589 if($tax_tree->isInTree($id))
590 {
591 $tax_tree->deleteTree($node_data);
592 }
593 ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
594 }
595
596 // feedback
597 ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
598
599 $ilCtrl->redirect($this, "listNodes");
600 }
$_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.

References $_POST, $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 260 of file class.ilObjTaxonomyGUI.php.

261 {
262 $this->create();
263 }
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 388 of file class.ilObjTaxonomyGUI.php.

389 {
390 global $tpl, $ilHelp;
391
392 $this->setTabs("list_items");
393 $ilHelp->setSubScreenId("create_node");
394
395 $this->initTaxNodeForm("create");
396 $tpl->setContent($this->form->getHTML());
397 }
initTaxNodeForm($a_mode="edit")
Init tax node form.
setTabs()
create tabs (repository/workspace switch)

References 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 534 of file class.ilObjTaxonomyGUI.php.

535 {
536 global $lng, $tpl, $ilCtrl, $ilTabs, $ilHelp;
537
538 if(!isset($_POST["id"]))
539 {
540 ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
541 $ilCtrl->redirect($this, "listNodes");
542 }
543
544 $this->setTabs("list_items");
545 $ilHelp->setSubScreenId("del_items");
546
547// $ilTabs->clearTargets();
548
549 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
550 $confirmation_gui = new ilConfirmationGUI();
551
552 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
553 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
554
555 // Add items to delete
556 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
557 foreach($_POST["id"] as $id)
558 {
559 $confirmation_gui->addItem("id[]", $id,
561 }
562
563 $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
564 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
565
566 $tpl->setContent($confirmation_gui->getHTML());
567 }
static _lookupTitle($a_obj_id)
Lookup Title.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $_POST, $ilCtrl, ilObjectGUI\$lng, 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 752 of file class.ilObjTaxonomyGUI.php.

753 {
754 global $ilCtrl, $lng;
755
756 $tax = $this->getCurrentTaxonomy();
757 $tax->delete();
758
759 ilUtil::sendSuccess($lng->txt("tax_tax_deleted"), true);
760 $ilCtrl->redirect($this, "listTaxonomies");
761 }

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

+ Here is the call graph for this function:

◆ editAOTaxonomySettings()

ilObjTaxonomyGUI::editAOTaxonomySettings ( )
Parameters

return

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

165 {
166 global $ilToolbar, $ilCtrl, $lng;
167
168
169// if (count($tax_ids) != 0 && !$this->getMultiple())
170// {
171// $this->listNodes();
172// }
173// else if ($this->getMultiple())
174// {
175 $this->listTaxonomies();
176// }
177
178 // currently we support only one taxonomy, otherwise we may need to provide
179 // a list here
180
181 }
listTaxonomies()
List taxonomies.

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

+ Here is the call graph for this function:

◆ editSettings()

ilObjTaxonomyGUI::editSettings ( )

Edit settings.

Parameters

return

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

833 {
834 global $tpl;
835
836 $this->setTabs("settings");
837
838 $form = $this->initSettingsForm();
839 $tpl->setContent($form->getHTML());
840 }

References 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 126 of file class.ilObjTaxonomyGUI.php.

127 {
128 global $ilCtrl, $ilUser, $ilTabs;
129
130 $next_class = $ilCtrl->getNextClass();
131
132 switch ($next_class)
133 {
134 default:
135 $cmd = $ilCtrl->getCmd("listTaxonomies");
136 $this->$cmd();
137 break;
138 }
139 }
$cmd
Definition: sahs_server.php:35
$ilUser
Definition: imgupload.php:18

References $cmd, $ilCtrl, and $ilUser.

◆ getAssignedObject()

ilObjTaxonomyGUI::getAssignedObject ( )

Get assigned object.

Returns
int object id

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

64 {
65 return $this->assigned_object_id;
66 }

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 207 of file class.ilObjTaxonomyGUI.php.

208 {
209 $tax_id = $this->getCurrentTaxonomyId();
210 if ($tax_id > 0)
211 {
212 $tax = new ilObjTaxonomy($tax_id);
213 return $tax;
214 }
215
216 return false;
217 }
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 189 of file class.ilObjTaxonomyGUI.php.

190 {
192 $tax_id = (int) $_GET["tax_id"];
193 if (in_array($tax_id, $tax_ids))
194 {
195 return $tax_id;
196 }
197 return false;
198 }
$_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 103 of file class.ilObjTaxonomyGUI.php.

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

Referenced by listTaxonomies().

+ Here is the caller graph for this function:

◆ getMultiple()

ilObjTaxonomyGUI::getMultiple ( )

Get multiple.

Returns
bool multiple

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

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 367 of file class.ilObjTaxonomyGUI.php.

369 {
370die("ilObjTaxonomyGUI::getTreeHTML is deprecated.");
371 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
372 $tax_exp = new ilTaxonomyExplorerGUI($a_class, $a_cmd, $a_tax_id,
373 $a_target_class, $a_target_cmd);
374 if (!$tax_exp->handleCommand())
375 {
376 return $tax_exp->getHTML()." ";
377 }
378 return;
379 }
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 43 of file class.ilObjTaxonomyGUI.php.

44 {
45 return "tax";
46 }

◆ initCreationForms()

ilObjTaxonomyGUI::initCreationForms (   $a_new_type)
protected

Init creation forms.

Reimplemented from ilObject2GUI.

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

145 {
146 $forms = array(
147 self::CFORM_NEW => $this->initCreateForm("tax")
148 );
149
150 return $forms;
151 }
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 845 of file class.ilObjTaxonomyGUI.php.

846 {
847 global $lng, $ilCtrl;
848
849 $tax = $this->getCurrentTaxonomy();
850
851 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
852 $form = new ilPropertyFormGUI();
853
854 // title
855 $ti = new ilTextInputGUI($lng->txt("title"), "title");
856 $ti->setMaxLength(200);
857 $form->addItem($ti);
858 $ti->setValue($tax->getTitle());
859
860 // description
861 $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
862 //$ta->setCols();
863 //$ta->setRows();
864 $form->addItem($ta);
865 $ta->setValue($tax->getDescription());
866
867 // sorting
868 $options = array(
869 ilObjTaxonomy::SORT_ALPHABETICAL => $lng->txt("tax_alphabetical"),
870 ilObjTaxonomy::SORT_MANUAL => $lng->txt("tax_manual")
871 );
872 $si = new ilSelectInputGUI($lng->txt("tax_node_sorting"), "sorting");
873 $si->setOptions($options);
874 $form->addItem($si);
875 $si->setValue($tax->getSortingMode());
876
877 // assigned item sorting
878 if ($this->assigned_item_sorting)
879 {
880 $cb = new ilCheckboxInputGUI($lng->txt("tax_item_sorting"), "item_sorting");
881 $cb->setChecked($tax->getItemSorting());
882 $form->addItem($cb);
883 }
884
885 $form->addCommandButton("updateSettings", $lng->txt("save"));
886
887 $form->setTitle($lng->txt("settings"));
888 $form->setFormAction($ilCtrl->getFormAction($this));
889
890 return $form;
891 }
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.
if(!is_array($argv)) $options

References $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 405 of file class.ilObjTaxonomyGUI.php.

406 {
407 global $lng, $ilCtrl;
408
409 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
410 $this->form = new ilPropertyFormGUI();
411
412 // title
413 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
414 $this->form->addItem($ti);
415
416 // order nr
417 $tax = $this->getCurrentTaxonomy();
418 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL)
419 {
420 $or = new ilTextInputGUI($this->lng->txt("tax_order_nr"), "order_nr");
421 $or->setMaxLength(5);
422 $or->setSize(5);
423 $this->form->addItem($or);
424 }
425
426 if ($a_mode == "edit")
427 {
428 $node = new ilTaxonomyNode((int) $_GET["tax_node"]);
429 $ti->setValue($node->getTitle());
430 $or->setValue($node->getOrderNr());
431 }
432
433 // save and cancel commands
434 if ($a_mode == "create")
435 {
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"));
439 }
440 else
441 {
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"));
445 }
446
447 $this->form->setFormAction($ilCtrl->getFormAction($this));
448
449 }

References $_GET, $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 926 of file class.ilObjTaxonomyGUI.php.

927 {
928 global $tpl, $ilToolbar, $lng, $ilCtrl;
929
930 $tax = $this->getCurrentTaxonomy();
931
932 $this->setTabs("ass_items");
933
934 // show tree
935 $this->showTree(true);
936
937 // list assigned items
938 include_once("./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
939 $table = new ilTaxAssignedItemsTableGUI($this, "listAssignedItems",
940 (int) $_GET["tax_node"], $this->getCurrentTaxonomy(), $this->assigned_item_comp_id,
941 $this->assigned_item_obj_id, $this->assigned_item_type, $this->assigned_item_info_obj);
942
943 $tpl->setContent($table->getHTML());
944 }
showTree($a_ass_items=false)
Show Editing Tree.
TableGUI class for taxonomy list.

References $_GET, $ilCtrl, ilObjectGUI\$lng, 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 226 of file class.ilObjTaxonomyGUI.php.

227 {
228 global $tpl, $ilToolbar, $lng, $ilCtrl;
229
230 $tax = $this->getCurrentTaxonomy();
231
232 $this->setTabs("list_items");
233
234 // show toolbar
235 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
236 $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
237
238 $ilToolbar->setCloseFormTag(false);
239
240
241 // show tree
242 $this->showTree();
243
244 // show subitems
245 include_once("./Services/Taxonomy/classes/class.ilTaxonomyTableGUI.php");
246 $table = new ilTaxonomyTableGUI($this, "listNodes", $tax->getTree(),
247 (int) $_GET["tax_node"], $this->getCurrentTaxonomy());
248 $table->setOpenFormTag(false);
249
250 $tpl->setContent($table->getHTML());
251 }
TableGUI class for taxonomies.

References $_GET, $ilCtrl, ilObjectGUI\$lng, 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 769 of file class.ilObjTaxonomyGUI.php.

770 {
771 global $tpl, $ilToolbar, $lng, $ilCtrl;
772
774 if (count($tax_ids) == 0 || $this->getMultiple())
775 {
776 $ilToolbar->addButton($lng->txt("tax_add_taxonomy"),
777 $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy"));
778 }
779 else
780 {
781 ilUtil::sendInfo($lng->txt("tax_max_one_tax"));
782 }
783
784 include_once("./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
785
786 $tab = new ilTaxonomyListTableGUI($this, "listTaxonomies", $this->getAssignedObject(),
787 $this->getListInfo());
788
789 $tpl->setContent($tab->getHTML());
790 }
getListInfo()
Get list info.
getMultiple()
Get multiple.
TableGUI class for taxonomy list.

References $ilCtrl, ilObjectGUI\$lng, $tab, 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 643 of file class.ilObjTaxonomyGUI.php.

644 {
645 global $tpl, $ilCtrl, $lng, $ilToolbar, $ilHelp;
646
647 if(!isset($_POST["id"]))
648 {
649 ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
650 $ilCtrl->redirect($this, "listNodes");
651 }
652
653 $this->setTabs("list_items");
654 $ilHelp->setSubScreenId("move_items");
655
656 $ilToolbar->addButton($lng->txt("cancel"),
657 $ilCtrl->getLinkTarget($this, "listNodes"));
658
659 ilUtil::sendInfo($lng->txt("tax_please_select_target"));
660
661 if (is_array($_POST["id"]))
662 {
663 $ilCtrl->setParameter($this, "move_ids", implode($_POST["id"], ","));
664
665 global $ilUser, $tpl, $ilCtrl, $lng;
666
667 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
668 $tax_exp = new ilTaxonomyExplorerGUI($this, "moveItems", $this->getCurrentTaxonomy()->getId(),
669 "ilobjtaxonomygui", "pasteItems");
670 if (!$tax_exp->handleCommand())
671 {
672 //$tpl->setLeftNavContent($tax_exp->getHTML());
673 $tpl->setContent($tax_exp->getHTML()." ");
674 }
675 }
676 }

References $_POST, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, 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 681 of file class.ilObjTaxonomyGUI.php.

682 {
683 global $lng, $ilCtrl;
684//var_dump($_GET);
685//var_dump($_POST);
686 if ($_GET["move_ids"] != "")
687 {
688 $move_ids = explode(",", $_GET["move_ids"]);
689 $tax = $this->getCurrentTaxonomy();
690 $tree = $tax->getTree();
691
692 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
693 $target_node = new ilTaxonomyNode((int) $_GET["tax_node"]);
694 foreach ($move_ids as $m_id)
695 {
696 // cross check taxonomy
697 $node = new ilTaxonomyNode((int) $m_id);
698 if ($node->getTaxonomyId() == $tax->getId() &&
699 ($target_node->getTaxonomyId() == $tax->getId() ||
700 $target_node->getId() == $tree->readRootId()))
701 {
702 // check if target is not within the selected nodes
703 if($tree->isGrandChild((int) $m_id, $target_node->getId()))
704 {
705 ilUtil::sendFailure($lng->txt("tax_target_within_nodes"), true);
706 $this->ctrl->redirect($this, "listNodes");
707 }
708
709 // if target is not current place, move
710 $parent_id = $tree->getParentId((int) $m_id);
711 if ($parent_id != $target_node->getId())
712 {
713 $tree->moveTree((int) $m_id, $target_node->getId());
714 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
716 }
717 }
718 }
719 }
720
721 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
722 $ilCtrl->redirect($this, "listNodes");
723 }

References $_GET, $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 306 of file class.ilObjTaxonomyGUI.php.

307 {
308 global $ilCtrl;
309
310 if ($this->getAssignedObject() > 0)
311 {
312 $_REQUEST["new_type"] = "tax";
313 }
314
315 parent::saveObject();
316 }

References $ilCtrl, and getAssignedObject().

+ Here is the call graph for this function:

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

Parameters

return

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

953 {
954 global $lng, $ilCtrl;
955
956 include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
957 if (is_array($_POST["order"]))
958 {
959 $order = $_POST["order"];
960 //asort($order, SORT_NUMERIC);
961 //$cnt = 10;
962 $tax_node = (int) $_GET["tax_node"];
963 foreach ($order as $a_item_id => $ord_nr)
964 {
965 $tax_ass = new ilTaxNodeAssignment($this->assigned_item_comp_id,
966 $this->assigned_item_obj_id,
967 $this->assigned_item_type, $this->getCurrentTaxonomyId());
968 $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
969 //$cnt+= 10;
970 }
971 $tax_ass = new ilTaxNodeAssignment($this->assigned_item_comp_id,
972 $this->assigned_item_obj_id,
973 $this->assigned_item_type, $this->getCurrentTaxonomyId());
974 $tax_ass->fixOrderNr($tax_node);
975 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
976 }
977 $ilCtrl->redirect($this, "listAssignedItems");
978 }
Taxonomy node <-> item assignment.

References $_GET, $_POST, $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 608 of file class.ilObjTaxonomyGUI.php.

609 {
610 global $ilCtrl, $lng;
611
612 // save sorting
613 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
614 if (is_array($_POST["order"]))
615 {
616// asort($_POST["order"]);
617// $cnt = 10;
618 foreach ($_POST["order"] as $k => $v)
619 {
621 }
623 }
624
625 // save titles
626 if (is_array($_POST["title"]))
627 {
628 foreach ($_POST["title"] as $k => $v)
629 {
632 }
633 }
634
635
636 ilUtil::sendSuccess($lng->txt("msg_obj_modified"));
637 $ilCtrl->redirect($this, "listNodes");
638 }
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, $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 455 of file class.ilObjTaxonomyGUI.php.

456 {
457 global $tpl, $lng, $ilCtrl;
458
459 $this->initTaxNodeForm("create");
460 if ($this->form->checkInput())
461 {
462 $tax = $this->getCurrentTaxonomy();
463
464 // create node
465 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
466 $node = new ilTaxonomyNode();
467 $node->setTitle($this->form->getInput("title"));
468
469 $tax = $this->getCurrentTaxonomy();
470 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL)
471 {
472 $order_nr = $this->form->getInput("order_nr");
473 }
474 if ($order_nr === "")
475 {
476 $order_nr = ilTaxonomyNode::getNextOrderNr($tax->getId(), (int) $_GET["tax_node"]);
477 }
478 //echo $order_nr; exit;
479 $node->setOrderNr($order_nr);
480 $node->setTaxonomyId($tax->getId());
481 $node->create();
482
483 // put in tree
484 ilTaxonomyNode::putInTree($tax->getId(), $node, (int) $_GET["tax_node"]);
485
486 ilTaxonomyNode::fixOrderNumbers($tax->getId(), (int) $_GET["tax_node"]);
487
488 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
489 $ilCtrl->redirect($this, "listNodes");
490 }
491 else
492 {
493 $this->form->setValuesByPost();
494 $tpl->setContent($this->form->getHtml());
495 }
496 }
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, $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 53 of file class.ilObjTaxonomyGUI.php.

54 {
55 $this->assigned_object_id = $a_val;
56 }

◆ setListInfo()

ilObjTaxonomyGUI::setListInfo (   $a_val)

Set list info.

Parameters
string$a_val

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

94 {
95 $this->list_info = trim($a_val);
96 }

◆ setMultiple()

ilObjTaxonomyGUI::setMultiple (   $a_val)

Set multiple.

Parameters
bool$a_valmultiple

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

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

◆ setTabs()

ilObjTaxonomyGUI::setTabs (   $a_id = "")

Set tabs.

Parameters
$a_idstring tab id to be activated

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

798 {
799 global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
800
801 $ilTabs->clearTargets();
802
803 $ilHelp->setScreenIdComponent("tax");
804
805 $tpl->clearHeader();
807 $tpl->setDescription(ilObject::_lookupDescription($this->getCurrentTaxonomyId()));
808 $tpl->setTitleIcon(ilUtil::getImagePath("icon_tax.svg"));
809
810 $ilTabs->setBackTarget($lng->txt("back"),
811 $ilCtrl->getLinkTarget($this, "listTaxonomies"));
812
813 $ilTabs->addTab("list_items", $lng->txt("tax_nodes"),
814 $ilCtrl->getLinkTarget($this, "listNodes"));
815 if ($this->assigned_item_sorting)
816 {
817 $ilTabs->addTab("ass_items", $lng->txt("tax_assigned_items"),
818 $ilCtrl->getLinkTarget($this, "listAssignedItems"));
819 }
820 $ilTabs->addTab("settings", $lng->txt("settings"),
821 $ilCtrl->getLinkTarget($this, "editSettings"));
822
823 $ilTabs->activateTab($a_id);
824 }
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 $ilCtrl, ilObjectGUI\$lng, 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 341 of file class.ilObjTaxonomyGUI.php.

342 {
343 global $ilUser, $tpl, $ilCtrl, $lng;
344
345 $tax = $this->getCurrentTaxonomy();
346
347 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
348 $cmd = $a_ass_items
349 ? "listAssignedItems"
350 : "listNodes";
351 $tax_exp = new ilTaxonomyExplorerGUI($this, "showTree", $tax->getId(),
352 "ilobjtaxonomygui", $cmd);
353 if (!$tax_exp->handleCommand())
354 {
355 //$tpl->setLeftNavContent($tax_exp->getHTML());
356 $tpl->setLeftContent($tax_exp->getHTML()."&nbsp;");
357 }
358 return;
359 }

References $cmd, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, 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 896 of file class.ilObjTaxonomyGUI.php.

897 {
898 global $tpl, $lng, $ilCtrl;
899
900 $form = $this->initSettingsForm();
901 if ($form->checkInput())
902 {
903 $tax = $this->getCurrentTaxonomy();
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"));
908 $tax->update();
909
910 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
911 $ilCtrl->redirect($this, "editSettings");
912 }
913 else
914 {
915 $form->setValuesByPost();
916 $tpl->setContent($form->getHtml());
917 }
918 }

References $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 502 of file class.ilObjTaxonomyGUI.php.

503 {
504 global $lng, $ilCtrl, $tpl;
505
506 $this->initTaxNodeForm("edit");
507 if ($this->form->checkInput())
508 {
509 // create node
510 $node = new ilTaxonomyNode($_GET["tax_node"]);
511 $node->setTitle($this->form->getInput("title"));
512
513 $tax = $this->getCurrentTaxonomy();
514 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL)
515 {
516 $node->setOrderNr($this->form->getInput("order_nr"));
517 }
518
519 $node->update();
520
521 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
522 $ilCtrl->redirect($this, "");
523 }
524 else
525 {
526 $this->form->setValuesByPost();
527 $tpl->setContent($this->form->getHtml());
528 }
529 }

References $_GET, $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 21 of file class.ilObjTaxonomyGUI.php.

◆ $multiple

ilObjTaxonomyGUI::$multiple = false
protected

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

Referenced by getMultiple().


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