ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 setModifier (?\ILIAS\Taxonomy\TaxonomyModifierGUI $modifier)
 
 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 Taxonomy Settings ModifierGUIInterface $modifier = null
 
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 47 of file class.ilObjTaxonomyGUI.php.

48 {
49 global $DIC;
50
51 $service = $DIC->taxonomy()->internal();
52 $this->gui = $gui = $service->gui();
53 $this->domain = $domain = $service->domain();
54
55 $this->ctrl = $gui->ctrl();
56 $this->tabs = $gui->tabs();
57 $this->toolbar = $gui->toolbar();
58 $this->tpl = $gui->ui()->mainTemplate();
59 $this->help = $gui->help();
60 // @todo introduce request wrapper
61 $this->request = $gui->http()->request();
62
63 $this->lng = $domain->lng();
64 $this->user = $domain->user();
65 $this->ui = $gui->ui();
66
67
69
70 $this->ctrl->saveParameter($this, "tax_node");
71 $this->ctrl->saveParameter($this, "tax_id");
72
73 $this->lng->loadLanguageModule("tax");
74
75 // @todo introduce request wrapper
76 $params = $this->request->getQueryParams();
77 $this->current_tax_node = (int) ($params["tax_node"] ?? null);
78 $this->requested_tax_id = (int) ($params["tax_id"] ?? null);
79 $this->requested_move_ids = (string) ($params["move_ids"] ?? "");
80 }
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 132 of file class.ilObjTaxonomyGUI.php.

137 : void {
138 $this->assigned_item_sorting = true;
139 $this->assigned_item_info_obj = $a_item_info_obj;
140 $this->assigned_item_comp_id = $a_component_id;
141 $this->assigned_item_obj_id = $a_obj_id;
142 $this->assigned_item_type = $a_item_type;
143 }

◆ afterSave()

ilObjTaxonomyGUI::afterSave ( ilObject  $a_new_object)
protected

After saving,.

Reimplemented from ilObjectGUI.

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

274 : void
275 {
276 $ilCtrl = $this->ctrl;
278
279 if ($this->getAssignedObject() > 0) {
281 $a_new_object->getId(),
282 $this->getAssignedObject()
283 );
284 $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
285 $this->tpl->setOnScreenMessage('success', $lng->txt("tax_added"), true);
286 $ilCtrl->redirect($this, "editSettings");
287 }
288 }
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 254 of file class.ilObjTaxonomyGUI.php.

254 : void
255 {
256 $ilCtrl = $this->ctrl;
257 if ($this->getAssignedObject() > 0) {
258 $ilCtrl->redirectToURL($this->getSettingsBackUrl());
259 }
260 parent::cancel();
261 }
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 238 of file class.ilObjTaxonomyGUI.php.

243 : bool {
244 if ($this->getAssignedObject() > 0) {
245 return true;
246 } else {
247 return parent::checkPermissionBool($perm, $cmd, $type, $node_id);
248 }
249 }

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

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

658 : void
659 {
660 $ilCtrl = $this->ctrl;
663
664 $tax = $this->getCurrentTaxonomy();
665
666 $cgui = new ilConfirmationGUI();
667 $cgui->setFormAction($ilCtrl->getFormAction($this));
668 $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
669 $cgui->setCancel($lng->txt("cancel"), "returnToSettingsParent");
670 $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
671
672 $cgui->addItem("id[]", 0, $tax->getTitle());
673
674 $tpl->setContent($cgui->getHTML());
675 }
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 513 of file class.ilObjTaxonomyGUI.php.

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

233 : void
234 {
235 $this->create();
236 }

◆ createTaxNode()

ilObjTaxonomyGUI::createTaxNode ( )

Create tax node.

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

340 : void
341 {
343 $ilHelp = $this->help;
344
345 $this->setTabs("list_items");
346 $ilHelp->setSubScreenId("create_node");
347
348 $form = $this->initTaxNodeForm("create");
349 $tpl->setContent($form->getHTML());
350 }
initTaxNodeForm(string $a_mode="edit")
setTabs()
create tabs (repository/workspace switch)

◆ deleteItems()

ilObjTaxonomyGUI::deleteItems ( )

Confirm deletion screen for items.

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

472 : void
473 {
476 $ilCtrl = $this->ctrl;
477 $ilHelp = $this->help;
478 $body = $this->request->getParsedBody();
479
480 if (!isset($body["id"])) {
481 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
482 $ilCtrl->redirect($this, "listNodes");
483 }
484
485 $this->setTabs("list_items");
486 $ilHelp->setSubScreenId("del_items");
487
488 // $ilTabs->clearTargets();
489
490 $confirmation_gui = new ilConfirmationGUI();
491
492 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
493 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
494
495 // Add items to delete
496 foreach ($body["id"] as $id) {
497 $confirmation_gui->addItem(
498 "id[]",
499 $id,
501 );
502 }
503
504 $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
505 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
506
507 $tpl->setContent($confirmation_gui->getHTML());
508 }
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 680 of file class.ilObjTaxonomyGUI.php.

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

References $lng.

◆ editAOTaxonomySettings()

ilObjTaxonomyGUI::editAOTaxonomySettings ( )

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

161 : void
162 {
163 $this->listTaxonomies();
164 }
listTaxonomies()
List taxonomies.

◆ editSettings()

ilObjTaxonomyGUI::editSettings ( )

Edit settings.

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

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

◆ executeCommand()

ilObjTaxonomyGUI::executeCommand ( )

Execute command.

Reimplemented from ilObject2GUI.

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

148 : void
149 {
150 $ilCtrl = $this->ctrl;
151 $this->tabs->activateSubTab("tax_settings");
152
153 $cmd = $ilCtrl->getCmd("listTaxonomies");
154 $this->$cmd();
155 }

References ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ getAssignedObject()

ilObjTaxonomyGUI::getAssignedObject ( )

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

95 : int
96 {
98 }

References $assigned_object_id.

◆ getCurrentTaxonomy()

ilObjTaxonomyGUI::getCurrentTaxonomy ( )

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

177 {
178 $tax_id = $this->getCurrentTaxonomyId();
179 if ($tax_id > 0) {
180 return new ilObjTaxonomy($tax_id);
181 }
182 return null;
183 }

◆ getCurrentTaxonomyId()

ilObjTaxonomyGUI::getCurrentTaxonomyId ( )

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

166 : ?int
167 {
169 $tax_id = $this->requested_tax_id;
170 if (in_array($tax_id, $tax_ids)) {
171 return $tax_id;
172 }
173 return null;
174 }
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 124 of file class.ilObjTaxonomyGUI.php.

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

References $list_info.

◆ getMultiple()

ilObjTaxonomyGUI::getMultiple ( )

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

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

References $multiple.

◆ getSettingsBackUrl()

ilObjTaxonomyGUI::getSettingsBackUrl ( )
protected

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

722 : string
723 {
724 return $this->ctrl->getParentReturn($this);
725 }

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

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

◆ initSettingsForm()

ilObjTaxonomyGUI::initSettingsForm ( )

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

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

◆ initTaxNodeForm()

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

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

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

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

868 : void
869 {
871
872 $this->setTabs("ass_items");
873
874 // show tree
875 $this->showTree(true);
876
877 // list assigned items
878 $table = new ilTaxAssignedItemsTableGUI(
879 $this,
880 "listAssignedItems",
881 $this->current_tax_node,
882 $this->getCurrentTaxonomy(),
883 $this->assigned_item_comp_id,
884 $this->assigned_item_obj_id,
885 $this->assigned_item_type,
886 $this->assigned_item_info_obj
887 );
888
889 $tpl->setContent($table->getHTML());
890 }
showTree(bool $a_ass_items=false)
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 188 of file class.ilObjTaxonomyGUI.php.

188 : void
189 {
191 $ilToolbar = $this->toolbar;
193 $ilCtrl = $this->ctrl;
194
195 $tax = $this->getCurrentTaxonomy();
196
197 $this->setTabs("list_items");
198
199 // show toolbar
200 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
201 $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
202
203 $ilToolbar->setCloseFormTag(false);
204
205 // show tree
206 $this->showTree();
207
208 $tax_node = $this->current_tax_node;
209 if ($tax_node === 0) {
210 $tax = $this->getCurrentTaxonomy();
211 if ($tax) {
212 $tree = $tax->getTree();
213 $tax_node = $tree->readRootId();
214 }
215 }
216
217 // show subitems
218 $table = new ilTaxonomyTableGUI(
219 $this,
220 "listNodes",
221 $tax->getTree(),
222 $tax_node,
223 $this->getCurrentTaxonomy()
224 );
225 $table->setOpenFormTag(false);
226
227 $tpl->setContent($table->getHTML());
228 }
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 695 of file class.ilObjTaxonomyGUI.php.

695 : void
696 {
698 $ilToolbar = $this->toolbar;
700 $ilCtrl = $this->ctrl;
701
703 if (count($tax_ids) == 0 || $this->getMultiple()) {
704 $ilToolbar->addButton(
705 $lng->txt("tax_add_taxonomy"),
706 $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy")
707 );
708 } else {
709 $this->tpl->setOnScreenMessage('info', $lng->txt("tax_max_one_tax"));
710 }
711
712 $tab = new ilTaxonomyListTableGUI(
713 $this,
714 "listTaxonomies",
715 $this->getAssignedObject(),
716 $this->getListInfo()
717 );
718
719 $tpl->setContent($tab->getHTML());
720 }
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 572 of file class.ilObjTaxonomyGUI.php.

572 : void
573 {
574 $ilCtrl = $this->ctrl;
576 $ilToolbar = $this->toolbar;
577 $ilHelp = $this->help;
578 $body = $this->request->getParsedBody();
579
580 if (!isset($body["id"])) {
581 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
582 $ilCtrl->redirect($this, "listNodes");
583 }
584
585 $this->setTabs("list_items");
586 $ilHelp->setSubScreenId("move_items");
587
588 $ilToolbar->addButton(
589 $lng->txt("cancel"),
590 $ilCtrl->getLinkTarget($this, "listNodes")
591 );
592
593 $this->tpl->setOnScreenMessage('info', $lng->txt("tax_please_select_target"));
594
595 if (is_array($body["id"])) {
596 $ilCtrl->setParameter($this, "move_ids", implode(",", $body["id"]));
597
599
600 $tax_exp = new ilTaxonomyExplorerGUI(
601 $this,
602 "moveItems",
603 $this->getCurrentTaxonomy()->getId(),
604 "ilobjtaxonomygui",
605 "pasteItems"
606 );
607 if (!$tax_exp->handleCommand()) {
608 //$tpl->setLeftNavContent($tax_exp->getHTML());
609 $tpl->setContent($tax_exp->getHTML(true) . " ");
610 }
611 }
612 }
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 617 of file class.ilObjTaxonomyGUI.php.

617 : void
618 {
620 $ilCtrl = $this->ctrl;
621 if ($this->requested_move_ids != "") {
622 $move_ids = explode(",", $this->requested_move_ids);
623 $tax = $this->getCurrentTaxonomy();
624 $tree = $tax->getTree();
625
626 $target_node = new ilTaxonomyNode($this->current_tax_node);
627 foreach ($move_ids as $m_id) {
628 // cross check taxonomy
629 $node = new ilTaxonomyNode((int) $m_id);
630 if ($node->getTaxonomyId() == $tax->getId() &&
631 ($target_node->getTaxonomyId() == $tax->getId() ||
632 $target_node->getId() == $tree->readRootId())) {
633 // check if target is not within the selected nodes
634 if ($tree->isGrandChild((int) $m_id, $target_node->getId()) ||
635 $m_id == $target_node->getId()) {
636 $this->tpl->setOnScreenMessage('failure', $lng->txt("tax_target_within_nodes"), true);
637 $this->ctrl->redirect($this, "listNodes");
638 }
639
640 // if target is not current place, move
641 $parent_id = $tree->getParentId((int) $m_id);
642 if ($parent_id != $target_node->getId()) {
643 $tree->moveTree((int) $m_id, $target_node->getId());
644 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
646 }
647 }
648 }
649 }
650
651 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
652 $ilCtrl->redirect($this, "listNodes");
653 }
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 727 of file class.ilObjTaxonomyGUI.php.

727 : void
728 {
729 $this->ctrl->redirectToURL($this->getSettingsBackUrl());
730 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ save()

ilObjTaxonomyGUI::save ( )

Reimplemented from ilObject2GUI.

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

263 : void
264 {
265 if ($this->getAssignedObject() > 0) {
266 $this->requested_new_type = "tax";
267 }
268 parent::saveObject();
269 }

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

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

895 : void
896 {
898 $ilCtrl = $this->ctrl;
899 $body = $this->request->getParsedBody();
900
901 if (is_array($body["order"])) {
902 $order = $body["order"];
903 $tax_node = $this->current_tax_node;
904 foreach ($order as $a_item_id => $ord_nr) {
905 $tax_ass = new ilTaxNodeAssignment(
906 $this->assigned_item_comp_id,
907 $this->assigned_item_obj_id,
908 $this->assigned_item_type,
909 (int) $this->getCurrentTaxonomyId()
910 );
911 $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
912 }
913 $tax_ass = new ilTaxNodeAssignment(
914 $this->assigned_item_comp_id,
915 $this->assigned_item_obj_id,
916 $this->assigned_item_type,
917 $this->getCurrentTaxonomyId()
918 );
919 $tax_ass->fixOrderNr($tax_node);
920 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
921 }
922 $ilCtrl->redirect($this, "listAssignedItems");
923 }
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 542 of file class.ilObjTaxonomyGUI.php.

542 : void
543 {
544 $ilCtrl = $this->ctrl;
546 $body = $this->request->getParsedBody();
547
548 // save sorting
549 if (is_array($body["order"] ?? false)) {
550 foreach ($body["order"] as $k => $v) {
552 }
553 ilTaxonomyNode::fixOrderNumbers($this->getCurrentTaxonomyId(), $this->current_tax_node);
554 }
555
556 // save titles
557 if (is_array($body["title"] ?? false)) {
558 foreach ($body["title"] as $k => $v) {
560 (int) $k,
562 );
563 }
564 }
565 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"));
566 $ilCtrl->redirect($this, "listNodes");
567 }
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 401 of file class.ilObjTaxonomyGUI.php.

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

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

◆ setListInfo()

ilObjTaxonomyGUI::setListInfo ( string  $a_val)

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

119 : void
120 {
121 $this->list_info = trim($a_val);
122 }

◆ setModifier()

ilObjTaxonomyGUI::setModifier ( ?\ILIAS\Taxonomy\TaxonomyModifierGUI  $modifier)

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

114 : void
115 {
116 $this->modifier = $modifier;
117 }
ILIAS Taxonomy Settings ModifierGUIInterface $modifier

References $modifier.

◆ setMultiple()

ilObjTaxonomyGUI::setMultiple ( bool  $a_val)

Set multiple.

Parameters
bool$a_valmultiple

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

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

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

735 : void
736 {
737 $ilTabs = $this->tabs;
738 $ilCtrl = $this->ctrl;
741 $ilHelp = $this->help;
742
743 $ilTabs->clearTargets();
744
745 $ilHelp->setScreenIdComponent("tax");
746
749 $tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_tax.svg"));
750
751 $ilTabs->setBackTarget(
752 $lng->txt("back"),
753 $this->getSettingsBackUrl()
754 );
755
756 $ilTabs->addTab(
757 "list_items",
758 $lng->txt("tax_nodes"),
759 $ilCtrl->getLinkTarget($this, "listNodes")
760 );
761 if ($this->assigned_item_sorting) {
762 $ilTabs->addTab(
763 "ass_items",
764 $lng->txt("tax_assigned_items"),
765 $ilCtrl->getLinkTarget($this, "listAssignedItems")
766 );
767 }
768 $ilTabs->addTab(
769 "settings",
770 $lng->txt("settings"),
771 $ilCtrl->getLinkTarget($this, "editSettings")
772 );
773
774 $ilTabs->activateTab($a_id);
775 }
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 290 of file class.ilObjTaxonomyGUI.php.

290 : void
291 {
292 global $DIC;
293
294 $tax = $this->getCurrentTaxonomy();
296
297 $cmd = $a_ass_items
298 ? "listAssignedItems"
299 : "listNodes";
300
301 $DIC->globalScreen()->tool()->context()->current()
302 ->addAdditionalData(
304 true
305 );
306 $DIC->globalScreen()->tool()->context()->current()
307 ->addAdditionalData(
310 );
311 $DIC->globalScreen()->tool()->context()->current()
312 ->addAdditionalData(
314 $tax->getId()
315 );
316 $DIC->globalScreen()->tool()->context()->current()
317 ->addAdditionalData(
319 $cmd
320 );
321 $DIC->globalScreen()->tool()->context()->current()
322 ->addAdditionalData(
324 "showTree"
325 );
326
327 $tax_exp = new ilTaxonomyExplorerGUI(
328 $this,
329 "showTree",
330 $tax->getId(),
331 "ilobjtaxonomygui",
332 $cmd
333 );
334 $tax_exp->handleCommand();
335 }
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 842 of file class.ilObjTaxonomyGUI.php.

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

References $lng.

◆ updateTaxNode()

ilObjTaxonomyGUI::updateTaxNode ( )

Update tax node.

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

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

References $lng, and ilObjTaxonomy\SORT_MANUAL.

Field Documentation

◆ $assigned_item_comp_id

string ilObjTaxonomyGUI::$assigned_item_comp_id = ""
protected

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

◆ $assigned_item_info_obj

ilTaxAssignedItemInfo ilObjTaxonomyGUI::$assigned_item_info_obj
protected

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

◆ $assigned_item_obj_id

int ilObjTaxonomyGUI::$assigned_item_obj_id = 0
protected

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

◆ $assigned_item_sorting

bool ilObjTaxonomyGUI::$assigned_item_sorting = false
protected

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

◆ $assigned_item_type

string ilObjTaxonomyGUI::$assigned_item_type = ""
protected

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

◆ $assigned_object_id

int ilObjTaxonomyGUI::$assigned_object_id = 0
protected

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

Referenced by getAssignedObject().

◆ $current_tax_node

int ilObjTaxonomyGUI::$current_tax_node = 0
protected

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

◆ $domain

ILIAS Taxonomy InternalDomainService ilObjTaxonomyGUI::$domain
protected

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

Referenced by __construct().

◆ $gui

ILIAS Taxonomy InternalGUIService ilObjTaxonomyGUI::$gui
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilObjTaxonomyGUI::$help
protected

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

◆ $list_info

string ilObjTaxonomyGUI::$list_info = ''
protected

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

Referenced by getListInfo().

◆ $modifier

ILIAS Taxonomy Settings ModifierGUIInterface ilObjTaxonomyGUI::$modifier = null
protected

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

Referenced by setModifier().

◆ $multiple

bool ilObjTaxonomyGUI::$multiple = false
protected

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

Referenced by getMultiple().

◆ $requested_move_ids

string ilObjTaxonomyGUI::$requested_move_ids = ""
protected

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

◆ $requested_tax_id

int ilObjTaxonomyGUI::$requested_tax_id = 0
protected

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

◆ $tabs

ilTabsGUI ilObjTaxonomyGUI::$tabs
protected

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

◆ $ui

ILIAS DI UIServices ilObjTaxonomyGUI::$ui
protected

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


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