ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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 268 of file class.ilObjTaxonomyGUI.php.

268 : void
269 {
270 $ilCtrl = $this->ctrl;
272
273 if ($this->getAssignedObject() > 0) {
275 $a_new_object->getId(),
276 $this->getAssignedObject()
277 );
278 $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
279 $this->tpl->setOnScreenMessage('success', $lng->txt("tax_added"), true);
280 $ilCtrl->redirect($this, "editSettings");
281 }
282 }
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 248 of file class.ilObjTaxonomyGUI.php.

248 : void
249 {
250 $ilCtrl = $this->ctrl;
251 if ($this->getAssignedObject() > 0) {
252 $ilCtrl->redirectToURL($this->getSettingsBackUrl());
253 }
254 parent::cancel();
255 }
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 232 of file class.ilObjTaxonomyGUI.php.

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

◆ confirmDeleteTaxonomy()

ilObjTaxonomyGUI::confirmDeleteTaxonomy ( )

Confirm taxonomy deletion.

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

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

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

◆ createTaxNode()

ilObjTaxonomyGUI::createTaxNode ( )

Create tax node.

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

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

◆ deleteItems()

ilObjTaxonomyGUI::deleteItems ( )

Confirm deletion screen for items.

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

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

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

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

774 : void
775 {
777
778 $this->setTabs("settings");
779
780 $form = $this->initSettingsForm();
781 $tpl->setContent($form->getHTML());
782 }

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

716 : string
717 {
718 return $this->ctrl->getParentReturn($this);
719 }

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

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

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

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

862 : void
863 {
865
866 $this->setTabs("ass_items");
867
868 // show tree
869 $this->showTree(true);
870
871 // list assigned items
872 $table = new ilTaxAssignedItemsTableGUI(
873 $this,
874 "listAssignedItems",
875 $this->current_tax_node,
876 $this->getCurrentTaxonomy(),
877 $this->assigned_item_comp_id,
878 $this->assigned_item_obj_id,
879 $this->assigned_item_type,
880 $this->assigned_item_info_obj
881 );
882
883 $tpl->setContent($table->getHTML());
884 }
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 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 689 of file class.ilObjTaxonomyGUI.php.

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

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

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

721 : void
722 {
723 $this->ctrl->redirectToURL($this->getSettingsBackUrl());
724 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ save()

ilObjTaxonomyGUI::save ( )

Reimplemented from ilObject2GUI.

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

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

◆ saveAssignedItemsSorting()

ilObjTaxonomyGUI::saveAssignedItemsSorting ( )

Save assigned items sorting.

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

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

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

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

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

284 : void
285 {
286 global $DIC;
287
288 $tax = $this->getCurrentTaxonomy();
290
291 $cmd = $a_ass_items
292 ? "listAssignedItems"
293 : "listNodes";
294
295 $DIC->globalScreen()->tool()->context()->current()
296 ->addAdditionalData(
298 true
299 );
300 $DIC->globalScreen()->tool()->context()->current()
301 ->addAdditionalData(
304 );
305 $DIC->globalScreen()->tool()->context()->current()
306 ->addAdditionalData(
308 $tax->getId()
309 );
310 $DIC->globalScreen()->tool()->context()->current()
311 ->addAdditionalData(
313 $cmd
314 );
315 $DIC->globalScreen()->tool()->context()->current()
316 ->addAdditionalData(
318 "showTree"
319 );
320
321 $tax_exp = new ilTaxonomyExplorerGUI(
322 $this,
323 "showTree",
324 $tax->getId(),
325 "ilobjtaxonomygui",
326 $cmd
327 );
328 $tax_exp->handleCommand();
329 }
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 836 of file class.ilObjTaxonomyGUI.php.

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

References $lng.

◆ updateTaxNode()

ilObjTaxonomyGUI::updateTaxNode ( )

Update tax node.

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

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

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: