ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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...
 
 isVisible ()
 
 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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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 ()
 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...
 
 prepareOutput ()
 prepare output 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 ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ()
 
 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 ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 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 ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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
 

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

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

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

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

273 {
274 if ($this->getAssignedObject() > 0)
275 {
276 return true;
277 }
278 else
279 {
280 return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_node_id);
281 }
282 }

References getAssignedObject().

+ Here is the call graph for this function:

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

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

731 {
732 global $ilCtrl, $tpl, $lng;
733
734 $tax = $this->getCurrentTaxonomy();
735
736 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
737 $cgui = new ilConfirmationGUI();
738 $cgui->setFormAction($ilCtrl->getFormAction($this));
739 $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
740 $cgui->setCancel($lng->txt("cancel"), "listTaxonomies");
741 $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
742
743 $cgui->addItem("id[]", $i, $tax->getTitle());
744
745 $tpl->setContent($cgui->getHTML());
746 }
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 574 of file class.ilObjTaxonomyGUI.php.

575 {
576 global $ilCtrl;
577
578 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
579
580 // delete all selected objects
581 foreach ($_POST["id"] as $id)
582 {
583 $node = new ilTaxonomyNode($id);
584 $tax = new ilObjTaxonomy($node->getTaxonomyId());
585 $tax_tree = $tax->getTree();
586 $node_data = $tax_tree->getNodeData($id);
587 if (is_object($node))
588 {
589 $node->delete();
590 }
591 if($tax_tree->isInTree($id))
592 {
593 $tax_tree->deleteTree($node_data);
594 }
595 ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
596 }
597
598 // feedback
599 ilUtil::sendInfo($this->lng->txt("info_deleted"),true);
600
601 $ilCtrl->redirect($this, "listNodes");
602 }
static fixOrderNumbers($a_tax_id, $a_parent_id)
Fix order numbers.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$_POST['username']
Definition: cron.php:12

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

263 {
264 $this->create();
265 }
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 390 of file class.ilObjTaxonomyGUI.php.

391 {
392 global $tpl, $ilHelp;
393
394 $this->setTabs("list_items");
395 $ilHelp->setSubScreenId("create_node");
396
397 $this->initTaxNodeForm("create");
398 $tpl->setContent($this->form->getHTML());
399 }
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 536 of file class.ilObjTaxonomyGUI.php.

537 {
538 global $lng, $tpl, $ilCtrl, $ilTabs, $ilHelp;
539
540 if(!isset($_POST["id"]))
541 {
542 ilUtil::sendFailure($this->lng->txt("no_checkbox"),true);
543 $ilCtrl->redirect($this, "listNodes");
544 }
545
546 $this->setTabs("list_items");
547 $ilHelp->setSubScreenId("del_items");
548
549// $ilTabs->clearTargets();
550
551 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
552 $confirmation_gui = new ilConfirmationGUI();
553
554 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
555 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
556
557 // Add items to delete
558 include_once("./Services/Taxonomy/classes/class.ilTaxonomyNode.php");
559 foreach($_POST["id"] as $id)
560 {
561 $confirmation_gui->addItem("id[]", $id,
563 }
564
565 $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
566 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
567
568 $tpl->setContent($confirmation_gui->getHTML());
569 }
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 754 of file class.ilObjTaxonomyGUI.php.

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

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

+ Here is the call graph for this function:

◆ editAOTaxonomySettings()

ilObjTaxonomyGUI::editAOTaxonomySettings ( )
Parameters

return

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

167 {
168 global $ilToolbar, $ilCtrl, $lng;
169
170
171// if (count($tax_ids) != 0 && !$this->getMultiple())
172// {
173// $this->listNodes();
174// }
175// else if ($this->getMultiple())
176// {
177 $this->listTaxonomies();
178// }
179
180 // currently we support only one taxonomy, otherwise we may need to provide
181 // a list here
182
183 }
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 834 of file class.ilObjTaxonomyGUI.php.

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

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
global $ilUser
Definition: imgupload.php:15

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

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

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

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

Init creation forms.

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

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

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

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

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

929 {
930 global $tpl, $ilToolbar, $lng, $ilCtrl;
931
932 $tax = $this->getCurrentTaxonomy();
933
934 $this->setTabs("ass_items");
935
936 // show tree
937 $this->showTree(true);
938
939 // list assigned items
940 include_once("./Services/Taxonomy/classes/class.ilTaxAssignedItemsTableGUI.php");
941 $table = new ilTaxAssignedItemsTableGUI($this, "listAssignedItems",
942 (int) $_GET["tax_node"], $this->getCurrentTaxonomy(), $this->assigned_item_comp_id,
943 $this->assigned_item_obj_id, $this->assigned_item_type, $this->assigned_item_info_obj);
944
945 $tpl->setContent($table->getHTML());
946 }
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 228 of file class.ilObjTaxonomyGUI.php.

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

772 {
773 global $tpl, $ilToolbar, $lng, $ilCtrl;
774
776 if (count($tax_ids) == 0 || $this->getMultiple())
777 {
778 $ilToolbar->addButton($lng->txt("tax_add_taxonomy"),
779 $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy"));
780 }
781 else
782 {
783 ilUtil::sendInfo($lng->txt("tax_max_one_tax"));
784 }
785
786 include_once("./Services/Taxonomy/classes/class.ilTaxonomyListTableGUI.php");
787
788 $tab = new ilTaxonomyListTableGUI($this, "listTaxonomies", $this->getAssignedObject(),
789 $this->getListInfo());
790
791 $tpl->setContent($tab->getHTML());
792 }
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 645 of file class.ilObjTaxonomyGUI.php.

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

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

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

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

309 {
310 global $ilCtrl;
311
312 if ($this->getAssignedObject() > 0)
313 {
314 $_REQUEST["new_type"] = "tax";
315 }
316
317 parent::saveObject();
318 }
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_REQUEST, $ilCtrl, and getAssignedObject().

+ Here is the call graph for this function:

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

Parameters

return

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

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

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

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

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

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

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

899 {
900 global $tpl, $lng, $ilCtrl;
901
902 $form = $this->initSettingsForm();
903 if ($form->checkInput())
904 {
905 $tax = $this->getCurrentTaxonomy();
906 $tax->setTitle($form->getInput("title"));
907 $tax->setDescription($form->getInput("description"));
908 $tax->setSortingMode($form->getInput("sorting"));
909 $tax->setItemSorting($form->getInput("item_sorting"));
910 $tax->update();
911
912 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
913 $ilCtrl->redirect($this, "editSettings");
914 }
915 else
916 {
917 $form->setValuesByPost();
918 $tpl->setContent($form->getHtml());
919 }
920 }

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

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

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: