ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjTaxonomyGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct ($a_id=0)
 
 getType ()
 
 setAssignedObject (int $a_val)
 
 getAssignedObject ()
 
 setMultiple (bool $a_val)
 Set multiple. More...
 
 getMultiple ()
 
 setListInfo (string $a_val)
 
 getListInfo ()
 
 activateAssignedItemSorting (ilTaxAssignedItemInfo $a_item_info_obj, string $a_component_id, int $a_obj_id, string $a_item_type)
 Activate sorting mode of assigned objects. More...
 
 executeCommand ()
 Execute command. More...
 
 editAOTaxonomySettings ()
 
 getCurrentTaxonomyId ()
 
 getCurrentTaxonomy ()
 
 listNodes ()
 List items. More...
 
 createAssignedTaxonomy ()
 Create assigned taxonomy. More...
 
 cancel ()
 Cancel creation. More...
 
 save ()
 
 showTree (bool $a_ass_items=false)
 
 createTaxNode ()
 Create tax node. More...
 
 initTaxNodeForm (string $a_mode="edit")
 
 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...
 
 editSettings ()
 Edit settings. More...
 
 initSettingsForm ()
 
 updateSettings ()
 Update taxonomy settings. More...
 
 listAssignedItems ()
 List assigned items. More...
 
 saveAssignedItemsSorting ()
 Save assigned items sorting. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 initCreationForms (string $a_new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 afterSave (ilObject $a_new_object)
 After saving,. More...
 
 setTabs ($a_id="")
 
- 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilTabsGUI $tabs
 
ilHelpGUI $help
 
bool $multiple = false
 
bool $assigned_item_sorting = false
 
int $assigned_object_id = 0
 
ilTaxAssignedItemInfo $assigned_item_info_obj
 
string $assigned_item_comp_id = ""
 
int $assigned_item_obj_id = 0
 
string $assigned_item_type = ""
 
string $list_info = ''
 
int $current_tax_node = 0
 
int $requested_tax_id = 0
 
string $requested_move_ids = ""
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObject2GUI
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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Taxonomy GUI class

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de ilObjTaxonomyGUI: ilObjTaxonomyGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilObjTaxonomyGUI::__construct (   $a_id = 0)

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

References $DIC, ilObject2GUI\$lng, $params, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ilObject2GUI\OBJECT_ID, ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

44  {
45  global $DIC;
46 
47  $this->ctrl = $DIC->ctrl();
48  $this->lng = $DIC->language();
49  $this->user = $DIC->user();
50  $this->tabs = $DIC->tabs();
51  $this->toolbar = $DIC->toolbar();
52  $this->tpl = $DIC["tpl"];
53  $this->help = $DIC[ilHelp::class];
54  $ilCtrl = $DIC->ctrl();
55  $lng = $DIC->language();
56 
58 
59  $ilCtrl->saveParameter($this, "tax_node");
60  $ilCtrl->saveParameter($this, "tax_id");
61 
62  $lng->loadLanguageModule("tax");
63 
64  // @todo introduce request wrapper
65  $this->request = $DIC->http()->request();
66  $params = $DIC->http()->request()->getQueryParams();
67  $this->current_tax_node = (int) ($params["tax_node"] ?? null);
68  $this->requested_tax_id = (int) ($params["tax_id"] ?? null);
69  $this->requested_move_ids = (string) ($params["move_ids"] ?? "");
70  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ activateAssignedItemSorting()

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

Activate sorting mode of assigned objects.

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

122  : void {
123  $this->assigned_item_sorting = true;
124  $this->assigned_item_info_obj = $a_item_info_obj;
125  $this->assigned_item_comp_id = $a_component_id;
126  $this->assigned_item_obj_id = $a_obj_id;
127  $this->assigned_item_type = $a_item_type;
128  }

◆ afterSave()

ilObjTaxonomyGUI::afterSave ( ilObject  $a_new_object)
protected

After saving,.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, getAssignedObject(), ilObject\getId(), ilObjTaxonomy\saveUsage(), and ilLanguage\txt().

269  : void
270  {
271  $ilCtrl = $this->ctrl;
272  $lng = $this->lng;
273 
274  if ($this->getAssignedObject() > 0) {
276  $a_new_object->getId(),
277  $this->getAssignedObject()
278  );
279  $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
280  $this->tpl->setOnScreenMessage('success', $lng->txt("tax_added"), true);
281  $ilCtrl->redirect($this, "editSettings");
282  }
283  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static saveUsage(int $a_tax_id, int $a_obj_id)
+ Here is the call graph for this function:

◆ cancel()

ilObjTaxonomyGUI::cancel ( )

Cancel creation.

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

References ilObject2GUI\$ctrl, getAssignedObject(), and ilCtrl\redirect().

249  : void
250  {
251  $ilCtrl = $this->ctrl;
252  if ($this->getAssignedObject() > 0) {
253  $ilCtrl->redirect($this, "listTaxonomies");
254  }
255  parent::cancel();
256  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ checkPermissionBool()

ilObjTaxonomyGUI::checkPermissionBool ( string  $perm,
string  $cmd = "",
string  $type = "",
?int  $node_id = null 
)
protected

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

References ilObject2GUI\$node_id, ilObject2GUI\$type, and getAssignedObject().

238  : bool {
239  if ($this->getAssignedObject() > 0) {
240  return true;
241  } else {
242  return parent::checkPermissionBool($perm, $cmd, $type, $node_id);
243  }
244  }
+ Here is the call graph for this function:

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$tpl, getCurrentTaxonomy(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

653  : void
654  {
655  $ilCtrl = $this->ctrl;
656  $tpl = $this->tpl;
657  $lng = $this->lng;
658 
659  $tax = $this->getCurrentTaxonomy();
660 
661  $cgui = new ilConfirmationGUI();
662  $cgui->setFormAction($ilCtrl->getFormAction($this));
663  $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
664  $cgui->setCancel($lng->txt("cancel"), "listTaxonomies");
665  $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
666 
667  $cgui->addItem("id[]", 0, $tax->getTitle());
668 
669  $tpl->setContent($cgui->getHTML());
670  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjTaxonomyGUI::confirmedDelete ( )

Delete taxonomy nodes.

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

References ilObject2GUI\$ctrl, ilObjectGUI\$id, ilObject2\delete(), ilTaxonomyNode\fixOrderNumbers(), ilObjTaxonomy\getTree(), and ILIAS\Repository\lng().

508  : void
509  {
510  $ilCtrl = $this->ctrl;
511  $body = $this->request->getParsedBody();
512 
513  // delete all selected objects
514  foreach ($body["id"] as $id) {
515  $node = new ilTaxonomyNode($id);
516  $tax = new ilObjTaxonomy($node->getTaxonomyId());
517  $tax_tree = $tax->getTree();
518  $node_data = $tax_tree->getNodeData($id);
519  if (is_object($node)) {
520  $node->delete();
521  }
522  if ($tax_tree->isInTree($id)) {
523  $tax_tree->deleteTree($node_data);
524  }
525  ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
526  }
527 
528  // feedback
529  $this->tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
530 
531  $ilCtrl->redirect($this, "listNodes");
532  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static fixOrderNumbers(int $a_tax_id, int $a_parent_id)
+ Here is the call graph for this function:

◆ createAssignedTaxonomy()

ilObjTaxonomyGUI::createAssignedTaxonomy ( )

Create assigned taxonomy.

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

References ilObject2GUI\create().

228  : void
229  {
230  $this->create();
231  }
+ Here is the call graph for this function:

◆ createTaxNode()

ilObjTaxonomyGUI::createTaxNode ( )

Create tax node.

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

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

335  : void
336  {
337  $tpl = $this->tpl;
338  $ilHelp = $this->help;
339 
340  $this->setTabs("list_items");
341  $ilHelp->setSubScreenId("create_node");
342 
343  $form = $this->initTaxNodeForm("create");
344  $tpl->setContent($form->getHTML());
345  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
setTabs()
create tabs (repository/workspace switch)
initTaxNodeForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ deleteItems()

ilObjTaxonomyGUI::deleteItems ( )

Confirm deletion screen for items.

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

References ilObject2GUI\$ctrl, $help, ilObjectGUI\$id, ilObject2GUI\$lng, ilObject2GUI\$tpl, ilTaxonomyNode\_lookupTitle(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setContent(), ilObject2GUI\setTabs(), and ilLanguage\txt().

467  : void
468  {
469  $lng = $this->lng;
470  $tpl = $this->tpl;
471  $ilCtrl = $this->ctrl;
472  $ilHelp = $this->help;
473  $body = $this->request->getParsedBody();
474 
475  if (!isset($body["id"])) {
476  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
477  $ilCtrl->redirect($this, "listNodes");
478  }
479 
480  $this->setTabs("list_items");
481  $ilHelp->setSubScreenId("del_items");
482 
483  // $ilTabs->clearTargets();
484 
485  $confirmation_gui = new ilConfirmationGUI();
486 
487  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
488  $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
489 
490  // Add items to delete
491  foreach ($body["id"] as $id) {
492  $confirmation_gui->addItem(
493  "id[]",
494  $id,
496  );
497  }
498 
499  $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
500  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
501 
502  $tpl->setContent($confirmation_gui->getHTML());
503  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
static _lookupTitle(int $a_obj_id)
ilGlobalTemplateInterface $tpl
setTabs()
create tabs (repository/workspace switch)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ deleteTaxonomy()

ilObjTaxonomyGUI::deleteTaxonomy ( )

Delete taxonomy.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, getCurrentTaxonomy(), and ilLanguage\txt().

675  : void
676  {
677  $ilCtrl = $this->ctrl;
678  $lng = $this->lng;
679 
680  $tax = $this->getCurrentTaxonomy();
681  $tax->delete();
682 
683  $this->tpl->setOnScreenMessage('success', $lng->txt("tax_tax_deleted"), true);
684  $ilCtrl->redirect($this, "listTaxonomies");
685  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ editAOTaxonomySettings()

ilObjTaxonomyGUI::editAOTaxonomySettings ( )

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

References listTaxonomies().

156  : void
157  {
158  $this->listTaxonomies();
159  }
listTaxonomies()
List taxonomies.
+ Here is the call graph for this function:

◆ editSettings()

ilObjTaxonomyGUI::editSettings ( )

Edit settings.

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

References ilObject2GUI\$tpl, initSettingsForm(), ilGlobalTemplateInterface\setContent(), and ilObject2GUI\setTabs().

765  : void
766  {
767  $tpl = $this->tpl;
768 
769  $this->setTabs("settings");
770 
771  $form = $this->initSettingsForm();
772  $tpl->setContent($form->getHTML());
773  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
setTabs()
create tabs (repository/workspace switch)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjTaxonomyGUI::executeCommand ( )

Execute command.

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

References ilObject2GUI\$ctrl, and ilCtrl\getCmd().

133  : void
134  {
135  $ilCtrl = $this->ctrl;
136 
137  $cmd = $ilCtrl->getCmd("listTaxonomies");
138  $this->$cmd();
139  }
getCmd(string $fallback_command=null)
+ Here is the call graph for this function:

◆ getAssignedObject()

ilObjTaxonomyGUI::getAssignedObject ( )

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

References $assigned_object_id.

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

85  : int
86  {
88  }
+ Here is the caller graph for this function:

◆ getCurrentTaxonomy()

ilObjTaxonomyGUI::getCurrentTaxonomy ( )

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

References getCurrentTaxonomyId().

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

171  : ?ilObjTaxonomy
172  {
173  $tax_id = $this->getCurrentTaxonomyId();
174  if ($tax_id > 0) {
175  return new ilObjTaxonomy($tax_id);
176  }
177  return null;
178  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentTaxonomyId()

ilObjTaxonomyGUI::getCurrentTaxonomyId ( )

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

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

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

161  : ?int
162  {
164  $tax_id = $this->requested_tax_id;
165  if (in_array($tax_id, $tax_ids)) {
166  return $tax_id;
167  }
168  return null;
169  }
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getListInfo()

ilObjTaxonomyGUI::getListInfo ( )

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

References $list_info.

Referenced by listTaxonomies().

109  : string
110  {
111  return $this->list_info;
112  }
+ Here is the caller graph for this function:

◆ getMultiple()

ilObjTaxonomyGUI::getMultiple ( )

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

References $multiple.

Referenced by listTaxonomies().

99  : bool
100  {
101  return $this->multiple;
102  }
+ Here is the caller graph for this function:

◆ getType()

ilObjTaxonomyGUI::getType ( )

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

72  : string
73  {
74  return "tax";
75  }

◆ initCreationForms()

ilObjTaxonomyGUI::initCreationForms ( string  $a_new_type)
protected

Init creation forms.

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

References ilObjectGUI\initCreateForm().

144  : array
145  {
146  return array(
147  self::CFORM_NEW => $this->initCreateForm("tax")
148  );
149  }
initCreateForm(string $new_type)
+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjTaxonomyGUI::initSettingsForm ( )

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, getCurrentTaxonomy(), ilCheckboxInputGUI\setChecked(), ilTextAreaInputGUI\setValue(), ilObjTaxonomy\SORT_ALPHABETICAL, ilObjTaxonomy\SORT_MANUAL, and ilLanguage\txt().

Referenced by editSettings(), and updateSettings().

776  {
777  $lng = $this->lng;
778  $ilCtrl = $this->ctrl;
779 
780  $tax = $this->getCurrentTaxonomy();
781 
782  $form = new ilPropertyFormGUI();
783 
784  // title
785  $ti = new ilTextInputGUI($lng->txt("title"), "title");
786  $ti->setMaxLength(200);
787 
788  $form->addItem($ti);
789  $ti->setValue($tax->getTitle());
790 
791  // description
792  $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
793  //$ta->setCols();
794  //$ta->setRows();
795  $form->addItem($ta);
796  $ta->setValue($tax->getDescription());
797 
798  // sorting
799  $options = array(
800  ilObjTaxonomy::SORT_ALPHABETICAL => $lng->txt("tax_alphabetical"),
801  ilObjTaxonomy::SORT_MANUAL => $lng->txt("tax_manual")
802  );
803  $si = new ilSelectInputGUI($lng->txt("tax_node_sorting"), "sorting");
804 
805  $si->setOptions($options);
806  $form->addItem($si);
807  $si->setValue($tax->getSortingMode());
808 
809  // assigned item sorting
810  if ($this->assigned_item_sorting) {
811  $cb = new ilCheckboxInputGUI($lng->txt("tax_item_sorting"), "item_sorting");
812  $cb->setChecked($tax->getItemSorting());
813  $form->addItem($cb);
814  }
815 
816  $form->addCommandButton("updateSettings", $lng->txt("save"));
817 
818  $form->setTitle($lng->txt("settings"));
819  $form->setFormAction($ilCtrl->getFormAction($this));
820 
821  return $form;
822  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a checkbox property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTaxNodeForm()

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

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, getCurrentTaxonomy(), ILIAS\Repository\lng(), ilObjTaxonomy\SORT_MANUAL, and ilLanguage\txt().

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

349  {
350  $lng = $this->lng;
351  $ilCtrl = $this->ctrl;
352 
353  $form = new ilPropertyFormGUI();
354 
355  // title
356  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
357  $form->addItem($ti);
358 
359  // order nr
360  $tax = $this->getCurrentTaxonomy();
361  $or = null;
362  if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
363  $or = new ilTextInputGUI($this->lng->txt("tax_order_nr"), "order_nr");
364  $or->setMaxLength(5);
365  $or->setSize(5);
366  $form->addItem($or);
367  }
368 
369  if ($a_mode == "edit") {
370  $node = new ilTaxonomyNode($this->current_tax_node);
371  $ti->setValue($node->getTitle());
372  if (is_object($or)) {
373  $or->setValue($node->getOrderNr());
374  }
375  }
376 
377  // save and cancel commands
378  if ($a_mode == "create") {
379  $form->addCommandButton("saveTaxNode", $lng->txt("save"));
380  $form->addCommandButton("listNodes", $lng->txt("cancel"));
381  $form->setTitle($lng->txt("tax_new_tax_node"));
382  } else {
383  $form->addCommandButton("updateTaxNode", $lng->txt("save"));
384  $form->addCommandButton("listNodes", $lng->txt("cancel"));
385  $form->setTitle($lng->txt("tax_edit_tax_node"));
386  }
387 
388  $form->setFormAction($ilCtrl->getFormAction($this));
389 
390  return $form;
391  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listAssignedItems()

ilObjTaxonomyGUI::listAssignedItems ( )

List assigned items.

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

References ilObject2GUI\$tpl, getCurrentTaxonomy(), ilGlobalTemplateInterface\setContent(), ilObject2GUI\setTabs(), and showTree().

853  : void
854  {
855  $tpl = $this->tpl;
856 
857  $this->setTabs("ass_items");
858 
859  // show tree
860  $this->showTree(true);
861 
862  // list assigned items
863  $table = new ilTaxAssignedItemsTableGUI(
864  $this,
865  "listAssignedItems",
866  $this->current_tax_node,
867  $this->getCurrentTaxonomy(),
868  $this->assigned_item_comp_id,
869  $this->assigned_item_obj_id,
870  $this->assigned_item_type,
871  $this->assigned_item_info_obj
872  );
873 
874  $tpl->setContent($table->getHTML());
875  }
showTree(bool $a_ass_items=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
setTabs()
create tabs (repository/workspace switch)
+ Here is the call graph for this function:

◆ listNodes()

ilObjTaxonomyGUI::listNodes ( )

List items.

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

References ilObject2GUI\$ctrl, $current_tax_node, ilObject2GUI\$lng, ilObject2GUI\$toolbar, ilObject2GUI\$tpl, ilObjectGUI\$tree, getCurrentTaxonomy(), ilTree\readRootId(), ilGlobalTemplateInterface\setContent(), ilTable2GUI\setOpenFormTag(), ilObject2GUI\setTabs(), showTree(), and ilLanguage\txt().

183  : void
184  {
185  $tpl = $this->tpl;
186  $ilToolbar = $this->toolbar;
187  $lng = $this->lng;
188  $ilCtrl = $this->ctrl;
189 
190  $tax = $this->getCurrentTaxonomy();
191 
192  $this->setTabs("list_items");
193 
194  // show toolbar
195  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
196  $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
197 
198  $ilToolbar->setCloseFormTag(false);
199 
200  // show tree
201  $this->showTree();
202 
203  $tax_node = $this->current_tax_node;
204  if ($tax_node === 0) {
205  $tax = $this->getCurrentTaxonomy();
206  if ($tax) {
207  $tree = $tax->getTree();
208  $tax_node = $tree->readRootId();
209  }
210  }
211 
212  // show subitems
213  $table = new ilTaxonomyTableGUI(
214  $this,
215  "listNodes",
216  $tax->getTree(),
217  $tax_node,
218  $this->getCurrentTaxonomy()
219  );
220  $table->setOpenFormTag(false);
221 
222  $tpl->setContent($table->getHTML());
223  }
showTree(bool $a_ass_items=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilToolbarGUI $toolbar
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setTabs()
create tabs (repository/workspace switch)
setOpenFormTag(bool $a_val)
+ Here is the call graph for this function:

◆ listTaxonomies()

ilObjTaxonomyGUI::listTaxonomies ( )

List taxonomies.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$toolbar, ilObject2GUI\$tpl, getAssignedObject(), getListInfo(), getMultiple(), ilObjTaxonomy\getUsageOfObject(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

Referenced by editAOTaxonomySettings().

690  : void
691  {
692  $tpl = $this->tpl;
693  $ilToolbar = $this->toolbar;
694  $lng = $this->lng;
695  $ilCtrl = $this->ctrl;
696 
698  if (count($tax_ids) == 0 || $this->getMultiple()) {
699  $ilToolbar->addButton(
700  $lng->txt("tax_add_taxonomy"),
701  $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy")
702  );
703  } else {
704  $this->tpl->setOnScreenMessage('info', $lng->txt("tax_max_one_tax"));
705  }
706 
707  $tab = new ilTaxonomyListTableGUI(
708  $this,
709  "listTaxonomies",
710  $this->getAssignedObject(),
711  $this->getListInfo()
712  );
713 
714  $tpl->setContent($tab->getHTML());
715  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
ilToolbarGUI $toolbar
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItems()

ilObjTaxonomyGUI::moveItems ( )

Move items.

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

References ilObject2GUI\$ctrl, $help, ilObject2GUI\$lng, ilObject2GUI\$toolbar, ilObject2GUI\$tpl, getCurrentTaxonomy(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setContent(), ilObject2GUI\setTabs(), and ilLanguage\txt().

567  : void
568  {
569  $ilCtrl = $this->ctrl;
570  $lng = $this->lng;
571  $ilToolbar = $this->toolbar;
572  $ilHelp = $this->help;
573  $body = $this->request->getParsedBody();
574 
575  if (!isset($body["id"])) {
576  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
577  $ilCtrl->redirect($this, "listNodes");
578  }
579 
580  $this->setTabs("list_items");
581  $ilHelp->setSubScreenId("move_items");
582 
583  $ilToolbar->addButton(
584  $lng->txt("cancel"),
585  $ilCtrl->getLinkTarget($this, "listNodes")
586  );
587 
588  $this->tpl->setOnScreenMessage('info', $lng->txt("tax_please_select_target"));
589 
590  if (is_array($body["id"])) {
591  $ilCtrl->setParameter($this, "move_ids", implode(",", $body["id"]));
592 
593  $tpl = $this->tpl;
594 
595  $tax_exp = new ilTaxonomyExplorerGUI(
596  $this,
597  "moveItems",
598  $this->getCurrentTaxonomy()->getId(),
599  "ilobjtaxonomygui",
600  "pasteItems"
601  );
602  if (!$tax_exp->handleCommand()) {
603  //$tpl->setLeftNavContent($tax_exp->getHTML());
604  $tpl->setContent($tax_exp->getHTML() . " ");
605  }
606  }
607  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilToolbarGUI $toolbar
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
setTabs()
create tabs (repository/workspace switch)
+ Here is the call graph for this function:

◆ pasteItems()

ilObjTaxonomyGUI::pasteItems ( )

Paste items (move operation)

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$parent_id, ilObjectGUI\$tree, ILIAS\Repository\ctrl(), ilTaxonomyNode\fixOrderNumbers(), getCurrentTaxonomy(), ilTree\getParentId(), ilTree\isGrandChild(), ilTree\moveTree(), ilTree\readRootId(), and ilLanguage\txt().

612  : void
613  {
614  $lng = $this->lng;
615  $ilCtrl = $this->ctrl;
616  if ($this->requested_move_ids != "") {
617  $move_ids = explode(",", $this->requested_move_ids);
618  $tax = $this->getCurrentTaxonomy();
619  $tree = $tax->getTree();
620 
621  $target_node = new ilTaxonomyNode($this->current_tax_node);
622  foreach ($move_ids as $m_id) {
623  // cross check taxonomy
624  $node = new ilTaxonomyNode((int) $m_id);
625  if ($node->getTaxonomyId() == $tax->getId() &&
626  ($target_node->getTaxonomyId() == $tax->getId() ||
627  $target_node->getId() == $tree->readRootId())) {
628  // check if target is not within the selected nodes
629  if ($tree->isGrandChild((int) $m_id, $target_node->getId()) ||
630  $m_id == $target_node->getId()) {
631  $this->tpl->setOnScreenMessage('failure', $lng->txt("tax_target_within_nodes"), true);
632  $this->ctrl->redirect($this, "listNodes");
633  }
634 
635  // if target is not current place, move
636  $parent_id = $tree->getParentId((int) $m_id);
637  if ($parent_id != $target_node->getId()) {
638  $tree->moveTree((int) $m_id, $target_node->getId());
639  ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
641  }
642  }
643  }
644  }
645 
646  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
647  $ilCtrl->redirect($this, "listNodes");
648  }
moveTree(int $a_source_id, int $a_target_id, int $a_location=self::POS_LAST_NODE)
Move Tree Implementation public.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
isGrandChild(int $a_startnode_id, int $a_querynode_id)
checks if a node is in the path of an other node
getParentId(int $a_node_id)
get parent id of given node
static fixOrderNumbers(int $a_tax_id, int $a_parent_id)
+ Here is the call graph for this function:

◆ save()

ilObjTaxonomyGUI::save ( )

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

References getAssignedObject().

258  : void
259  {
260  if ($this->getAssignedObject() > 0) {
261  $this->requested_new_type = "tax";
262  }
263  parent::saveObject();
264  }
+ Here is the call graph for this function:

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

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

References ilObject2GUI\$ctrl, $current_tax_node, ilObject2GUI\$lng, getCurrentTaxonomyId(), and ilLanguage\txt().

880  : void
881  {
882  $lng = $this->lng;
883  $ilCtrl = $this->ctrl;
884  $body = $this->request->getParsedBody();
885 
886  if (is_array($body["order"])) {
887  $order = $body["order"];
888  $tax_node = $this->current_tax_node;
889  foreach ($order as $a_item_id => $ord_nr) {
890  $tax_ass = new ilTaxNodeAssignment(
891  $this->assigned_item_comp_id,
892  $this->assigned_item_obj_id,
893  $this->assigned_item_type,
894  (int) $this->getCurrentTaxonomyId()
895  );
896  $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
897  }
898  $tax_ass = new ilTaxNodeAssignment(
899  $this->assigned_item_comp_id,
900  $this->assigned_item_obj_id,
901  $this->assigned_item_type,
902  $this->getCurrentTaxonomyId()
903  );
904  $tax_ass->fixOrderNr($tax_node);
905  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
906  }
907  $ilCtrl->redirect($this, "listAssignedItems");
908  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:

◆ saveSorting()

ilObjTaxonomyGUI::saveSorting ( )

Save settings and sorting.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilTaxonomyNode\fixOrderNumbers(), getCurrentTaxonomyId(), ilUtil\stripSlashes(), ilLanguage\txt(), ilTaxonomyNode\writeOrderNr(), and ilTaxonomyNode\writeTitle().

537  : void
538  {
539  $ilCtrl = $this->ctrl;
540  $lng = $this->lng;
541  $body = $this->request->getParsedBody();
542 
543  // save sorting
544  if (is_array($body["order"] ?? null)) {
545  foreach ($body["order"] as $k => $v) {
547  }
548  ilTaxonomyNode::fixOrderNumbers($this->getCurrentTaxonomyId(), $this->current_tax_node);
549  }
550 
551  // save titles
552  if (is_array($body["title"] ?? null)) {
553  foreach ($body["title"] as $k => $v) {
555  (int) $k,
557  );
558  }
559  }
560  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"));
561  $ilCtrl->redirect($this, "listNodes");
562  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static writeTitle(int $a_node_id, string $a_title)
Write title.
static writeOrderNr(int $a_node_id, int $a_order_nr)
static fixOrderNumbers(int $a_tax_id, int $a_parent_id)
+ Here is the call graph for this function:

◆ saveTaxNode()

ilObjTaxonomyGUI::saveTaxNode ( )

Save tax node form.

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

References ilObject2GUI\$ctrl, $current_tax_node, ilObject2GUI\$lng, ilObject2GUI\$tpl, ilTaxonomyNode\fixOrderNumbers(), getCurrentTaxonomy(), ilTaxonomyNode\getNextOrderNr(), initTaxNodeForm(), ilTaxonomyNode\putInTree(), ilGlobalTemplateInterface\setContent(), ilObjTaxonomy\SORT_MANUAL, and ilLanguage\txt().

396  : void
397  {
398  $tpl = $this->tpl;
399  $lng = $this->lng;
400  $ilCtrl = $this->ctrl;
401 
402  $form = $this->initTaxNodeForm("create");
403  if ($form->checkInput()) {
404  // create node
405  $node = new ilTaxonomyNode();
406  $node->setTitle($form->getInput("title"));
407 
408  $tax = $this->getCurrentTaxonomy();
409  $order_nr = "";
410  if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
411  $order_nr = $form->getInput("order_nr");
412  }
413  if ($order_nr === "") {
414  $order_nr = ilTaxonomyNode::getNextOrderNr($tax->getId(), $this->current_tax_node);
415  }
416  //echo $order_nr; exit;
417  $node->setOrderNr($order_nr);
418  $node->setTaxonomyId($tax->getId());
419  $node->create();
420 
421  // put in tree
422  ilTaxonomyNode::putInTree($tax->getId(), $node, $this->current_tax_node);
423 
425 
426  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
427  $ilCtrl->redirect($this, "listNodes");
428  } else {
429  $form->setValuesByPost();
430  $tpl->setContent($form->getHTML());
431  }
432  }
static getNextOrderNr(int $a_tax_id, int $a_parent_id)
Put this node into the taxonomy tree.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
static putInTree(int $a_tax_id, ilTaxonomyNode $a_node, int $a_parent_id=0, int $a_target_node_id=0, int $a_order_nr=0)
initTaxNodeForm(string $a_mode="edit")
static fixOrderNumbers(int $a_tax_id, int $a_parent_id)
+ Here is the call graph for this function:

◆ setAssignedObject()

ilObjTaxonomyGUI::setAssignedObject ( int  $a_val)
Parameters
int$a_valobject id

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

80  : void
81  {
82  $this->assigned_object_id = $a_val;
83  }

◆ setListInfo()

ilObjTaxonomyGUI::setListInfo ( string  $a_val)

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

104  : void
105  {
106  $this->list_info = trim($a_val);
107  }

◆ setMultiple()

ilObjTaxonomyGUI::setMultiple ( bool  $a_val)

Set multiple.

Parameters
bool$a_valmultiple

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

References ILIAS\UI\examples\MainControls\SystemInfo\multiple().

94  : void
95  {
96  $this->multiple = $a_val;
97  }
+ Here is the call graph for this function:

◆ setTabs()

ilObjTaxonomyGUI::setTabs (   $a_id = "")
protected

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

References ilObject2GUI\$ctrl, $help, ilObject2GUI\$lng, $tabs, ilObject2GUI\$tpl, ilObject\_lookupDescription(), ilObject\_lookupTitle(), getCurrentTaxonomyId(), ilUtil\getImagePath(), ilGlobalTemplateInterface\setDescription(), ilHelpGUI\setScreenIdComponent(), ilGlobalTemplateInterface\setTitle(), ilGlobalTemplateInterface\setTitleIcon(), and ilLanguage\txt().

720  : void
721  {
722  $ilTabs = $this->tabs;
723  $ilCtrl = $this->ctrl;
724  $tpl = $this->tpl;
725  $lng = $this->lng;
726  $ilHelp = $this->help;
727 
728  $ilTabs->clearTargets();
729 
730  $ilHelp->setScreenIdComponent("tax");
731 
734  $tpl->setTitleIcon(ilUtil::getImagePath("icon_tax.svg"));
735 
736  $ilTabs->setBackTarget(
737  $lng->txt("back"),
738  $ilCtrl->getLinkTarget($this, "listTaxonomies")
739  );
740 
741  $ilTabs->addTab(
742  "list_items",
743  $lng->txt("tax_nodes"),
744  $ilCtrl->getLinkTarget($this, "listNodes")
745  );
746  if ($this->assigned_item_sorting) {
747  $ilTabs->addTab(
748  "ass_items",
749  $lng->txt("tax_assigned_items"),
750  $ilCtrl->getLinkTarget($this, "listAssignedItems")
751  );
752  }
753  $ilTabs->addTab(
754  "settings",
755  $lng->txt("settings"),
756  $ilCtrl->getLinkTarget($this, "editSettings")
757  );
758 
759  $ilTabs->activateTab($a_id);
760  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
static _lookupTitle(int $obj_id)
setScreenIdComponent(string $a_comp)
ilGlobalTemplateInterface $tpl
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
static _lookupDescription(int $obj_id)
setDescription(string $a_descr)
Sets description below title in standard template.
+ Here is the call graph for this function:

◆ showTree()

ilObjTaxonomyGUI::showTree ( bool  $a_ass_items = false)

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

References ilObject2GUI\$ctrl, $DIC, ilCtrl\getCurrentClassPath(), getCurrentTaxonomy(), ilExplorerBaseGUI\handleCommand(), ilTaxonomyGSToolProvider\SHOW_TAX_TREE, ilTaxonomyGSToolProvider\TAX_ID, ilTaxonomyGSToolProvider\TAX_TREE_CMD, ilTaxonomyGSToolProvider\TAX_TREE_GUI_PATH, and ilTaxonomyGSToolProvider\TAX_TREE_PARENT_CMD.

Referenced by listAssignedItems(), and listNodes().

285  : void
286  {
287  global $DIC;
288 
289  $tax = $this->getCurrentTaxonomy();
290  $ctrl = $this->ctrl;
291 
292  $cmd = $a_ass_items
293  ? "listAssignedItems"
294  : "listNodes";
295 
296  $DIC->globalScreen()->tool()->context()->current()
297  ->addAdditionalData(
299  true
300  );
301  $DIC->globalScreen()->tool()->context()->current()
302  ->addAdditionalData(
305  );
306  $DIC->globalScreen()->tool()->context()->current()
307  ->addAdditionalData(
309  $tax->getId()
310  );
311  $DIC->globalScreen()->tool()->context()->current()
312  ->addAdditionalData(
314  $cmd
315  );
316  $DIC->globalScreen()->tool()->context()->current()
317  ->addAdditionalData(
319  "showTree"
320  );
321 
322  $tax_exp = new ilTaxonomyExplorerGUI(
323  $this,
324  "showTree",
325  $tax->getId(),
326  "ilobjtaxonomygui",
327  $cmd
328  );
329  $tax_exp->handleCommand();
330  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
handleCommand()
Handle explorer internal command.
global $DIC
Definition: feed.php:28
getCurrentClassPath()
+ 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 827 of file class.ilObjTaxonomyGUI.php.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$tpl, getCurrentTaxonomy(), initSettingsForm(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

827  : void
828  {
829  $tpl = $this->tpl;
830  $lng = $this->lng;
831  $ilCtrl = $this->ctrl;
832 
833  $form = $this->initSettingsForm();
834  if ($form->checkInput()) {
835  $tax = $this->getCurrentTaxonomy();
836  $tax->setTitle($form->getInput("title"));
837  $tax->setDescription($form->getInput("description"));
838  $tax->setSortingMode((int) $form->getInput("sorting"));
839  $tax->setItemSorting((bool) $form->getInput("item_sorting"));
840  $tax->update();
841 
842  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
843  $ilCtrl->redirect($this, "editSettings");
844  } else {
845  $form->setValuesByPost();
846  $tpl->setContent($form->getHTML());
847  }
848  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ updateTaxNode()

ilObjTaxonomyGUI::updateTaxNode ( )

Update tax node.

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

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\$tpl, getCurrentTaxonomy(), initTaxNodeForm(), ilGlobalTemplateInterface\setContent(), ilObjTaxonomy\SORT_MANUAL, and ilLanguage\txt().

437  : void
438  {
439  $lng = $this->lng;
440  $ilCtrl = $this->ctrl;
441  $tpl = $this->tpl;
442 
443  $form = $this->initTaxNodeForm("edit");
444  if ($form->checkInput()) {
445  // create node
446  $node = new ilTaxonomyNode($this->current_tax_node);
447  $node->setTitle($form->getInput("title"));
448 
449  $tax = $this->getCurrentTaxonomy();
450  if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
451  $node->setOrderNr($form->getInput("order_nr"));
452  }
453 
454  $node->update();
455 
456  $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
457  $ilCtrl->redirect($this, "");
458  } else {
459  $form->setValuesByPost();
460  $tpl->setContent($form->getHTML());
461  }
462  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
initTaxNodeForm(string $a_mode="edit")
+ Here is the call graph for this function:

Field Documentation

◆ $assigned_item_comp_id

string ilObjTaxonomyGUI::$assigned_item_comp_id = ""
protected

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

◆ $assigned_item_info_obj

ilTaxAssignedItemInfo ilObjTaxonomyGUI::$assigned_item_info_obj
protected

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

◆ $assigned_item_obj_id

int ilObjTaxonomyGUI::$assigned_item_obj_id = 0
protected

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

◆ $assigned_item_sorting

bool ilObjTaxonomyGUI::$assigned_item_sorting = false
protected

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

◆ $assigned_item_type

string ilObjTaxonomyGUI::$assigned_item_type = ""
protected

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

◆ $assigned_object_id

int ilObjTaxonomyGUI::$assigned_object_id = 0
protected

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

Referenced by getAssignedObject().

◆ $current_tax_node

int ilObjTaxonomyGUI::$current_tax_node = 0
protected

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

Referenced by listNodes(), saveAssignedItemsSorting(), and saveTaxNode().

◆ $help

ilHelpGUI ilObjTaxonomyGUI::$help
protected

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

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

◆ $list_info

string ilObjTaxonomyGUI::$list_info = ''
protected

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

Referenced by getListInfo().

◆ $multiple

bool ilObjTaxonomyGUI::$multiple = false
protected

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

Referenced by getMultiple().

◆ $requested_move_ids

string ilObjTaxonomyGUI::$requested_move_ids = ""
protected

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

◆ $requested_tax_id

int ilObjTaxonomyGUI::$requested_tax_id = 0
protected

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

Referenced by getCurrentTaxonomyId().

◆ $tabs

ilTabsGUI ilObjTaxonomyGUI::$tabs
protected

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

Referenced by setTabs().


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