ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 ()
 @inheritDoc More...
 
 getType ()
 Functions that must be overwritten. More...
 
 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)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 afterSave (ilObject $a_new_object)
 After saving,. More...
 
 getSettingsBackUrl ()
 
 returnToSettingsParent ()
 
 setTabs ($a_id="")
 @inheritDoc 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 ()
 
 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="")
 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...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) 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...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. 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...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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 ()
 @abstract 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...
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ILIAS DI UIServices $ui
 
ILIAS Taxonomy InternalGUIService $gui
 
ILIAS Taxonomy InternalDomainService $domain
 
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
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
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 = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

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 @ilCtrl_Calls ilObjTaxonomyGUI: ilObjTaxonomyGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilObjTaxonomyGUI::__construct ( )

@inheritDoc

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

47 {
48 global $DIC;
49
50 $service = $DIC->taxonomy()->internal();
51 $this->gui = $gui = $service->gui();
52 $this->domain = $domain = $service->domain();
53
54 $this->ctrl = $gui->ctrl();
55 $this->tabs = $gui->tabs();
56 $this->toolbar = $gui->toolbar();
57 $this->tpl = $gui->ui()->mainTemplate();
58 $this->help = $gui->help();
59 // @todo introduce request wrapper
60 $this->request = $gui->http()->request();
61
62 $this->lng = $domain->lng();
63 $this->user = $domain->user();
64 $this->ui = $gui->ui();
65
66
68
69 $this->ctrl->saveParameter($this, "tax_node");
70 $this->ctrl->saveParameter($this, "tax_id");
71
72 $this->lng->loadLanguageModule("tax");
73
74 // @todo introduce request wrapper
75 $params = $this->request->getQueryParams();
76 $this->current_tax_node = (int) ($params["tax_node"] ?? null);
77 $this->requested_tax_id = (int) ($params["tax_id"] ?? null);
78 $this->requested_move_ids = (string) ($params["move_ids"] ?? "");
79 }
ILIAS Taxonomy InternalDomainService $domain
ILIAS Taxonomy InternalGUIService $gui
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
$service
Definition: ltiresult.php:36
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

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

131 : void {
132 $this->assigned_item_sorting = true;
133 $this->assigned_item_info_obj = $a_item_info_obj;
134 $this->assigned_item_comp_id = $a_component_id;
135 $this->assigned_item_obj_id = $a_obj_id;
136 $this->assigned_item_type = $a_item_type;
137 }

◆ afterSave()

ilObjTaxonomyGUI::afterSave ( ilObject  $a_new_object)
protected

After saving,.

Reimplemented from ilObjectGUI.

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

269 : void
270 {
271 $ilCtrl = $this->ctrl;
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)

References $lng, ilObject\getId(), and ilObjTaxonomy\saveUsage().

+ Here is the call graph for this function:

◆ cancel()

ilObjTaxonomyGUI::cancel ( )

Cancel creation.

Reimplemented from ilObject2GUI.

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

249 : void
250 {
251 $ilCtrl = $this->ctrl;
252 if ($this->getAssignedObject() > 0) {
253 $ilCtrl->redirectToURL($this->getSettingsBackUrl());
254 }
255 parent::cancel();
256 }
redirectToURL(string $target_url)
@inheritDoc

◆ checkPermissionBool()

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

Reimplemented from ilObject2GUI.

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

238 : bool {
239 if ($this->getAssignedObject() > 0) {
240 return true;
241 } else {
242 return parent::checkPermissionBool($perm, $cmd, $type, $node_id);
243 }
244 }

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

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

655 : void
656 {
657 $ilCtrl = $this->ctrl;
660
661 $tax = $this->getCurrentTaxonomy();
662
663 $cgui = new ilConfirmationGUI();
664 $cgui->setFormAction($ilCtrl->getFormAction($this));
665 $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
666 $cgui->setCancel($lng->txt("cancel"), "returnToSettingsParent");
667 $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
668
669 $cgui->addItem("id[]", 0, $tax->getTitle());
670
671 $tpl->setContent($cgui->getHTML());
672 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References $lng.

◆ confirmedDelete()

ilObjTaxonomyGUI::confirmedDelete ( )

Delete taxonomy nodes.

Reimplemented from ilObject2GUI.

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

510 : void
511 {
512 $ilCtrl = $this->ctrl;
513 $body = $this->request->getParsedBody();
514
515 // delete all selected objects
516 foreach ($body["id"] as $id) {
517 $node = new ilTaxonomyNode($id);
518 $tax = new ilObjTaxonomy($node->getTaxonomyId());
519 $tax_tree = $tax->getTree();
520 $node_data = $tax_tree->getNodeData($id);
521 if (is_object($node)) {
522 $node->delete();
523 }
524 if ($tax_tree->isInTree($id)) {
525 $tax_tree->deleteTree($node_data);
526 }
527 ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
528 }
529
530 // feedback
531 $this->tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
532
533 $ilCtrl->redirect($this, "listNodes");
534 }
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)

References $id, ilTaxonomyNode\fixOrderNumbers(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ createAssignedTaxonomy()

ilObjTaxonomyGUI::createAssignedTaxonomy ( )

Create assigned taxonomy.

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

227 : void
228 {
229 $this->requested_new_type = "tax";
230 $this->create();
231 }

◆ createTaxNode()

ilObjTaxonomyGUI::createTaxNode ( )

Create tax node.

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

335 : void
336 {
338 $ilHelp = $this->help;
339
340 $this->showTree();
341 $this->setTabs("list_items");
342 $ilHelp->setSubScreenId("create_node");
343
344 $form = $this->initTaxNodeForm("create");
345 $tpl->setContent($form->getHTML());
346 }
initTaxNodeForm(string $a_mode="edit")
showTree(bool $a_ass_items=false)
setTabs()
create tabs (repository/workspace switch)

◆ deleteItems()

ilObjTaxonomyGUI::deleteItems ( )

Confirm deletion screen for items.

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

468 : void
469 {
472 $ilCtrl = $this->ctrl;
473 $ilHelp = $this->help;
474 $body = $this->request->getParsedBody();
475 $this->showTree();
476
477 if (!isset($body["id"])) {
478 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
479 $ilCtrl->redirect($this, "listNodes");
480 }
481
482 $this->setTabs("list_items");
483 $ilHelp->setSubScreenId("del_items");
484
485 // $ilTabs->clearTargets();
486
487 $confirmation_gui = new ilConfirmationGUI();
488
489 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
490 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
491
492 // Add items to delete
493 foreach ($body["id"] as $id) {
494 $confirmation_gui->addItem(
495 "id[]",
496 $id,
498 );
499 }
500
501 $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
502 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
503
504 $tpl->setContent($confirmation_gui->getHTML());
505 }
static _lookupTitle(int $a_obj_id)

References $id, $lng, ilTaxonomyNode\_lookupTitle(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ deleteTaxonomy()

ilObjTaxonomyGUI::deleteTaxonomy ( )

Delete taxonomy.

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

677 : void
678 {
679 $ilCtrl = $this->ctrl;
681
682 $tax = $this->getCurrentTaxonomy();
683 $tax->delete();
684
685 $this->tpl->setOnScreenMessage('success', $lng->txt("tax_tax_deleted"), true);
686 $this->returnToSettingsParent();
687 }

References $lng.

◆ editAOTaxonomySettings()

ilObjTaxonomyGUI::editAOTaxonomySettings ( )

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

155 : void
156 {
157 $this->listTaxonomies();
158 }
listTaxonomies()
List taxonomies.

◆ editSettings()

ilObjTaxonomyGUI::editSettings ( )

Edit settings.

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

777 : void
778 {
780
781 $this->showTree();
782 $this->setTabs("settings");
783
784 $form = $this->initSettingsForm();
785 $tpl->setContent($form->getHTML());
786 }

◆ executeCommand()

ilObjTaxonomyGUI::executeCommand ( )

Execute command.

Reimplemented from ilObject2GUI.

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

142 : void
143 {
144 $ilCtrl = $this->ctrl;
145 $this->tabs->activateSubTab("tax_settings");
146
147 $cmd = $ilCtrl->getCmd("listTaxonomies");
148 $this->$cmd();
149 }

References ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ getAssignedObject()

ilObjTaxonomyGUI::getAssignedObject ( )

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

94 : int
95 {
97 }

References $assigned_object_id.

◆ getCurrentTaxonomy()

ilObjTaxonomyGUI::getCurrentTaxonomy ( )

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

171 {
172 $tax_id = $this->getCurrentTaxonomyId();
173 if ($tax_id > 0) {
174 return new ilObjTaxonomy($tax_id);
175 }
176 return null;
177 }

◆ getCurrentTaxonomyId()

ilObjTaxonomyGUI::getCurrentTaxonomyId ( )

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

160 : ?int
161 {
163 $tax_id = $this->requested_tax_id;
164 if (in_array($tax_id, $tax_ids)) {
165 return $tax_id;
166 }
167 return null;
168 }
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)

References ilObjTaxonomy\getUsageOfObject().

+ Here is the call graph for this function:

◆ getListInfo()

ilObjTaxonomyGUI::getListInfo ( )

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

118 : string
119 {
120 return $this->list_info;
121 }

References $list_info.

◆ getMultiple()

ilObjTaxonomyGUI::getMultiple ( )

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

108 : bool
109 {
110 return $this->multiple;
111 }

References $multiple.

◆ getSettingsBackUrl()

ilObjTaxonomyGUI::getSettingsBackUrl ( )
protected

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

719 : string
720 {
721 return $this->ctrl->getParentReturn($this);
722 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getType()

ilObjTaxonomyGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

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

81 : string
82 {
83 return "tax";
84 }

◆ initSettingsForm()

ilObjTaxonomyGUI::initSettingsForm ( )

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

789 {
791 $ilCtrl = $this->ctrl;
792
793 $tax = $this->getCurrentTaxonomy();
794
795 $form = new ilPropertyFormGUI();
796
797 // title
798 $ti = new ilTextInputGUI($lng->txt("title"), "title");
799 $ti->setMaxLength(200);
800
801 $form->addItem($ti);
802 $ti->setValue($tax->getTitle());
803
804 // description
805 $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
806 //$ta->setCols();
807 //$ta->setRows();
808 $form->addItem($ta);
809 $ta->setValue($tax->getDescription());
810
811 // sorting
812 $options = array(
813 ilObjTaxonomy::SORT_ALPHABETICAL => $lng->txt("tax_alphabetical"),
814 ilObjTaxonomy::SORT_MANUAL => $lng->txt("tax_manual")
815 );
816 $si = new ilSelectInputGUI($lng->txt("tax_node_sorting"), "sorting");
817
818 $si->setOptions($options);
819 $form->addItem($si);
820 $si->setValue($tax->getSortingMode());
821
822 // assigned item sorting
823 if ($this->assigned_item_sorting) {
824 $cb = new ilCheckboxInputGUI($lng->txt("tax_item_sorting"), "item_sorting");
825 $cb->setChecked($tax->getItemSorting());
826 $form->addItem($cb);
827 }
828
829 $form->addCommandButton("updateSettings", $lng->txt("save"));
830
831 $form->setTitle($lng->txt("settings"));
832 $form->setFormAction($ilCtrl->getFormAction($this));
833
834 return $form;
835 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References $lng, ILIAS\UI\Implementation\Component\Input\Field\$options, ilObjTaxonomy\SORT_ALPHABETICAL, and ilObjTaxonomy\SORT_MANUAL.

◆ initTaxNodeForm()

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

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

350 {
352 $ilCtrl = $this->ctrl;
353
354 $form = new ilPropertyFormGUI();
355
356 // title
357 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
358 $form->addItem($ti);
359
360 // order nr
361 $tax = $this->getCurrentTaxonomy();
362 $or = null;
363 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
364 $or = new ilTextInputGUI($this->lng->txt("tax_order_nr"), "order_nr");
365 $or->setMaxLength(5);
366 $or->setSize(5);
367 $form->addItem($or);
368 }
369
370 if ($a_mode == "edit") {
371 $node = new ilTaxonomyNode($this->current_tax_node);
372 $ti->setValue($node->getTitle());
373 if (is_object($or)) {
374 $or->setValue($node->getOrderNr());
375 }
376 }
377
378 // save and cancel commands
379 if ($a_mode == "create") {
380 $form->addCommandButton("saveTaxNode", $lng->txt("save"));
381 $form->addCommandButton("listNodes", $lng->txt("cancel"));
382 $form->setTitle($lng->txt("tax_new_tax_node"));
383 } else {
384 $form->addCommandButton("updateTaxNode", $lng->txt("save"));
385 $form->addCommandButton("listNodes", $lng->txt("cancel"));
386 $form->setTitle($lng->txt("tax_edit_tax_node"));
387 }
388
389 $form->setFormAction($ilCtrl->getFormAction($this));
390
391 return $form;
392 }

References $lng, ILIAS\Repository\lng(), and ilObjTaxonomy\SORT_MANUAL.

+ Here is the call graph for this function:

◆ listAssignedItems()

ilObjTaxonomyGUI::listAssignedItems ( )

List assigned items.

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

866 : void
867 {
869
870 $this->setTabs("ass_items");
871
872 // show tree
873 $this->showTree(true);
874
875 // list assigned items
876 $table = new ilTaxAssignedItemsTableGUI(
877 $this,
878 "listAssignedItems",
879 $this->current_tax_node,
880 $this->getCurrentTaxonomy(),
881 $this->assigned_item_comp_id,
882 $this->assigned_item_obj_id,
883 $this->assigned_item_type,
884 $this->assigned_item_info_obj
885 );
886
887 $tpl->setContent($table->getHTML());
888 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ listNodes()

ilObjTaxonomyGUI::listNodes ( )

List items.

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

182 : void
183 {
185 $ilToolbar = $this->toolbar;
187 $ilCtrl = $this->ctrl;
188
189 $tax = $this->getCurrentTaxonomy();
190
191 $this->setTabs("list_items");
192
193 // show toolbar
194 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
195 $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
196
197 $ilToolbar->setCloseFormTag(false);
198
199 // show tree
200 $this->showTree();
201
202 $tax_node = $this->current_tax_node;
203 if ($tax_node === 0) {
204 $tax = $this->getCurrentTaxonomy();
205 if ($tax) {
206 $tree = $tax->getTree();
207 $tax_node = $tree->readRootId();
208 }
209 }
210
211 // show subitems
212 $table = new ilTaxonomyTableGUI(
213 $this,
214 "listNodes",
215 $tax->getTree(),
216 $tax_node,
217 $this->getCurrentTaxonomy()
218 );
219 $table->setOpenFormTag(false);
220
221 $tpl->setContent($table->getHTML());
222 }
ilToolbarGUI $toolbar
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng.

◆ listTaxonomies()

ilObjTaxonomyGUI::listTaxonomies ( )

List taxonomies.

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

692 : void
693 {
695 $ilToolbar = $this->toolbar;
697 $ilCtrl = $this->ctrl;
698
700 if (count($tax_ids) == 0 || $this->getMultiple()) {
701 $ilToolbar->addButton(
702 $lng->txt("tax_add_taxonomy"),
703 $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy")
704 );
705 } else {
706 $this->tpl->setOnScreenMessage('info', $lng->txt("tax_max_one_tax"));
707 }
708
709 $tab = new ilTaxonomyListTableGUI(
710 $this,
711 "listTaxonomies",
712 $this->getAssignedObject(),
713 $this->getListInfo()
714 );
715
716 $tpl->setContent($tab->getHTML());
717 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng, and ilObjTaxonomy\getUsageOfObject().

+ Here is the call graph for this function:

◆ moveItems()

ilObjTaxonomyGUI::moveItems ( )

Move items.

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

569 : void
570 {
571 $ilCtrl = $this->ctrl;
573 $ilToolbar = $this->toolbar;
574 $ilHelp = $this->help;
575 $body = $this->request->getParsedBody();
576
577 if (!isset($body["id"])) {
578 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
579 $ilCtrl->redirect($this, "listNodes");
580 }
581
582 $this->setTabs("list_items");
583 $ilHelp->setSubScreenId("move_items");
584
585 $ilToolbar->addButton(
586 $lng->txt("cancel"),
587 $ilCtrl->getLinkTarget($this, "listNodes")
588 );
589
590 $this->tpl->setOnScreenMessage('info', $lng->txt("tax_please_select_target"));
591
592 if (is_array($body["id"])) {
593 $ilCtrl->setParameter($this, "move_ids", implode(",", $body["id"]));
594
596
597 $tax_exp = new ilTaxonomyExplorerGUI(
598 $this,
599 "moveItems",
600 $this->getCurrentTaxonomy()->getId(),
601 "ilobjtaxonomygui",
602 "pasteItems"
603 );
604 if (!$tax_exp->handleCommand()) {
605 //$tpl->setLeftNavContent($tax_exp->getHTML());
606 $tpl->setContent($tax_exp->getHTML(true) . " ");
607 }
608 }
609 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng, ILIAS\Survey\Mode\getId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ pasteItems()

ilObjTaxonomyGUI::pasteItems ( )

Paste items (move operation)

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

614 : void
615 {
617 $ilCtrl = $this->ctrl;
618 if ($this->requested_move_ids != "") {
619 $move_ids = explode(",", $this->requested_move_ids);
620 $tax = $this->getCurrentTaxonomy();
621 $tree = $tax->getTree();
622
623 $target_node = new ilTaxonomyNode($this->current_tax_node);
624 foreach ($move_ids as $m_id) {
625 // cross check taxonomy
626 $node = new ilTaxonomyNode((int) $m_id);
627 if ($node->getTaxonomyId() == $tax->getId() &&
628 ($target_node->getTaxonomyId() == $tax->getId() ||
629 $target_node->getId() == $tree->readRootId())) {
630 // check if target is not within the selected nodes
631 if ($tree->isGrandChild((int) $m_id, $target_node->getId()) ||
632 $m_id == $target_node->getId()) {
633 $this->tpl->setOnScreenMessage('failure', $lng->txt("tax_target_within_nodes"), true);
634 $this->ctrl->redirect($this, "listNodes");
635 }
636
637 // if target is not current place, move
638 $parent_id = $tree->getParentId((int) $m_id);
639 if ($parent_id != $target_node->getId()) {
640 $tree->moveTree((int) $m_id, $target_node->getId());
641 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
643 }
644 }
645 }
646 }
647
648 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
649 $ilCtrl->redirect($this, "listNodes");
650 }
isGrandChild(int $a_startnode_id, int $a_querynode_id)
checks if a node is in the path of an other node
moveTree(int $a_source_id, int $a_target_id, int $a_location=self::POS_LAST_NODE)
Move Tree Implementation @access public.
getParentId(int $a_node_id)
get parent id of given node

References $lng, ILIAS\Repository\ctrl(), and ilTaxonomyNode\fixOrderNumbers().

+ Here is the call graph for this function:

◆ returnToSettingsParent()

ilObjTaxonomyGUI::returnToSettingsParent ( )
protected

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

724 : void
725 {
726 $this->ctrl->redirectToURL($this->getSettingsBackUrl());
727 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ save()

ilObjTaxonomyGUI::save ( )

Reimplemented from ilObject2GUI.

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

258 : void
259 {
260 if ($this->getAssignedObject() > 0) {
261 $this->requested_new_type = "tax";
262 }
263 parent::saveObject();
264 }

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

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

893 : void
894 {
896 $ilCtrl = $this->ctrl;
897 $body = $this->request->getParsedBody();
898
899 if (is_array($body["order"])) {
900 $order = $body["order"];
901 $tax_node = $this->current_tax_node;
902 foreach ($order as $a_item_id => $ord_nr) {
903 $tax_ass = new ilTaxNodeAssignment(
904 $this->assigned_item_comp_id,
905 $this->assigned_item_obj_id,
906 $this->assigned_item_type,
907 (int) $this->getCurrentTaxonomyId()
908 );
909 $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
910 }
911 $tax_ass = new ilTaxNodeAssignment(
912 $this->assigned_item_comp_id,
913 $this->assigned_item_obj_id,
914 $this->assigned_item_type,
915 $this->getCurrentTaxonomyId()
916 );
917 $tax_ass->fixOrderNr($tax_node);
918 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
919 }
920 $ilCtrl->redirect($this, "listAssignedItems");
921 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng.

◆ saveSorting()

ilObjTaxonomyGUI::saveSorting ( )

Save settings and sorting.

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

539 : void
540 {
541 $ilCtrl = $this->ctrl;
543 $body = $this->request->getParsedBody();
544
545 // save sorting
546 if (is_array($body["order"] ?? false)) {
547 foreach ($body["order"] as $k => $v) {
549 }
550 ilTaxonomyNode::fixOrderNumbers($this->getCurrentTaxonomyId(), $this->current_tax_node);
551 }
552
553 // save titles
554 if (is_array($body["title"] ?? false)) {
555 foreach ($body["title"] as $k => $v) {
557 (int) $k,
559 );
560 }
561 }
562 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"));
563 $ilCtrl->redirect($this, "listNodes");
564 }
static writeTitle(int $a_node_id, string $a_title)
Write title.
static writeOrderNr(int $a_node_id, int $a_order_nr)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References $lng, ilTaxonomyNode\fixOrderNumbers(), 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 397 of file class.ilObjTaxonomyGUI.php.

397 : void
398 {
401 $ilCtrl = $this->ctrl;
402
403 $form = $this->initTaxNodeForm("create");
404 if ($form->checkInput()) {
405 // create node
406 $node = new ilTaxonomyNode();
407 $node->setTitle($form->getInput("title"));
408
409 $tax = $this->getCurrentTaxonomy();
410 $order_nr = "";
411 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
412 $order_nr = $form->getInput("order_nr");
413 }
414 if ($order_nr === "") {
415 $order_nr = ilTaxonomyNode::getNextOrderNr($tax->getId(), $this->current_tax_node);
416 }
417 //echo $order_nr; exit;
418 $node->setOrderNr($order_nr);
419 $node->setTaxonomyId($tax->getId());
420 $node->create();
421
422 // put in tree
423 ilTaxonomyNode::putInTree($tax->getId(), $node, $this->current_tax_node);
424
425 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $this->current_tax_node);
426
427 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
428 $ilCtrl->redirect($this, "listNodes");
429 } else {
430 $form->setValuesByPost();
431 $tpl->setContent($form->getHTML());
432 }
433 }
static getNextOrderNr(int $a_tax_id, int $a_parent_id)
Put this node into the taxonomy tree.
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)

References $lng, ilTaxonomyNode\fixOrderNumbers(), ilTaxonomyNode\getNextOrderNr(), ilTaxonomyNode\putInTree(), and ilObjTaxonomy\SORT_MANUAL.

+ Here is the call graph for this function:

◆ setAssignedObject()

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

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

89 : void
90 {
91 $this->assigned_object_id = $a_val;
92 }

◆ setListInfo()

ilObjTaxonomyGUI::setListInfo ( string  $a_val)

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

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

◆ setMultiple()

ilObjTaxonomyGUI::setMultiple ( bool  $a_val)

Set multiple.

Parameters
bool$a_valmultiple

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

103 : void
104 {
105 $this->multiple = $a_val;
106 }

References ILIAS\UI\examples\Input\Field\File\multiple().

+ Here is the call graph for this function:

◆ setTabs()

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

@inheritDoc

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

732 : void
733 {
734 $ilTabs = $this->tabs;
735 $ilCtrl = $this->ctrl;
738 $ilHelp = $this->help;
739
740 $ilTabs->clearTargets();
741
742 $ilHelp->setScreenIdComponent("tax");
743
746 $tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_tax.svg"));
747
748 $ilTabs->setBackTarget(
749 $lng->txt("back"),
750 $this->getSettingsBackUrl()
751 );
752
753 $ilTabs->addTab(
754 "list_items",
755 $lng->txt("tax_nodes"),
756 $ilCtrl->getLinkTarget($this, "listNodes")
757 );
758 if ($this->assigned_item_sorting) {
759 $ilTabs->addTab(
760 "ass_items",
761 $lng->txt("tax_assigned_items"),
762 $ilCtrl->getLinkTarget($this, "listAssignedItems")
763 );
764 }
765 $ilTabs->addTab(
766 "settings",
767 $lng->txt("settings"),
768 $ilCtrl->getLinkTarget($this, "editSettings")
769 );
770
771 $ilTabs->activateTab($a_id);
772 }
setScreenIdComponent(string $a_comp)
static _lookupTitle(int $obj_id)
static _lookupDescription(int $obj_id)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setDescription(string $a_descr)
Sets description below title in standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon

References $lng, ilObject\_lookupDescription(), ilObject\_lookupTitle(), and ilUtil\getImagePath().

+ 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.

285 : void
286 {
287 global $DIC;
288
289 $tax = $this->getCurrentTaxonomy();
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 }
getCurrentClassPath()
@inheritDoc

References $DIC, ilTaxonomyGSToolProvider\SHOW_TAX_TREE, ilTaxonomyGSToolProvider\TAX_ID, ilTaxonomyGSToolProvider\TAX_TREE_CMD, ilTaxonomyGSToolProvider\TAX_TREE_GUI_PATH, and ilTaxonomyGSToolProvider\TAX_TREE_PARENT_CMD.

◆ updateSettings()

ilObjTaxonomyGUI::updateSettings ( )

Update taxonomy settings.

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

840 : void
841 {
844 $ilCtrl = $this->ctrl;
845
846 $form = $this->initSettingsForm();
847 if ($form->checkInput()) {
848 $tax = $this->getCurrentTaxonomy();
849 $tax->setTitle($form->getInput("title"));
850 $tax->setDescription($form->getInput("description"));
851 $tax->setSortingMode((int) $form->getInput("sorting"));
852 $tax->setItemSorting((bool) $form->getInput("item_sorting"));
853 $tax->update();
854
855 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
856 $ilCtrl->redirect($this, "editSettings");
857 } else {
858 $form->setValuesByPost();
859 $tpl->setContent($form->getHTML());
860 }
861 }

References $lng.

◆ updateTaxNode()

ilObjTaxonomyGUI::updateTaxNode ( )

Update tax node.

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

438 : void
439 {
441 $ilCtrl = $this->ctrl;
443
444 $form = $this->initTaxNodeForm("edit");
445 if ($form->checkInput()) {
446 // create node
447 $node = new ilTaxonomyNode($this->current_tax_node);
448 $node->setTitle($form->getInput("title"));
449
450 $tax = $this->getCurrentTaxonomy();
451 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
452 $node->setOrderNr($form->getInput("order_nr"));
453 }
454
455 $node->update();
456
457 $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
458 $ilCtrl->redirect($this, "");
459 } else {
460 $form->setValuesByPost();
461 $tpl->setContent($form->getHTML());
462 }
463 }

References $lng, and ilObjTaxonomy\SORT_MANUAL.

Field Documentation

◆ $assigned_item_comp_id

string ilObjTaxonomyGUI::$assigned_item_comp_id = ""
protected

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

◆ $assigned_item_info_obj

ilTaxAssignedItemInfo ilObjTaxonomyGUI::$assigned_item_info_obj
protected

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

◆ $assigned_item_obj_id

int ilObjTaxonomyGUI::$assigned_item_obj_id = 0
protected

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

◆ $assigned_item_sorting

bool ilObjTaxonomyGUI::$assigned_item_sorting = false
protected

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

◆ $assigned_item_type

string ilObjTaxonomyGUI::$assigned_item_type = ""
protected

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

◆ $assigned_object_id

int ilObjTaxonomyGUI::$assigned_object_id = 0
protected

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

Referenced by getAssignedObject().

◆ $current_tax_node

int ilObjTaxonomyGUI::$current_tax_node = 0
protected

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

◆ $domain

ILIAS Taxonomy InternalDomainService ilObjTaxonomyGUI::$domain
protected

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

Referenced by __construct().

◆ $gui

ILIAS Taxonomy InternalGUIService ilObjTaxonomyGUI::$gui
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilObjTaxonomyGUI::$help
protected

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

◆ $list_info

string ilObjTaxonomyGUI::$list_info = ''
protected

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

Referenced by getListInfo().

◆ $multiple

bool ilObjTaxonomyGUI::$multiple = false
protected

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

Referenced by getMultiple().

◆ $requested_move_ids

string ilObjTaxonomyGUI::$requested_move_ids = ""
protected

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

◆ $requested_tax_id

int ilObjTaxonomyGUI::$requested_tax_id = 0
protected

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

◆ $tabs

ilTabsGUI ilObjTaxonomyGUI::$tabs
protected

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

◆ $ui

ILIAS DI UIServices ilObjTaxonomyGUI::$ui
protected

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


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