ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjSkillTreeGUI Class Reference

Skill tree gui class. More...

+ Inheritance diagram for ilObjSkillTreeGUI:
+ Collaboration diagram for ilObjSkillTreeGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 init (Service\SkillInternalManagerService $skill_manager)
 
 executeCommand ()
 
 initTreeForm (bool $edit=false)
 
 save ()
 
 delete ()
 
 getAdminTabs ()
 
 editSkills ()
 
 saveAllTitles (bool $a_succ_mess=true)
 
 saveAllTemplateTitles (bool $a_succ_mess=true)
 
 expandAll (bool $a_redirect=true)
 
 collapseAll (bool $a_redirect=true)
 
 deleteNodes (object $a_gui)
 
 cancelDelete ()
 
 confirmedDeleteTrees ()
 
 confirmedDelete ()
 
 editSkillTemplates ()
 
 showTree (bool $a_templates, $a_gui="", $a_gui_cmd="")
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

ilObject $object
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 showLocator ()
 
 getSkillManagementLink ()
 
 create ()
 
 edit ()
 
- 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 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...
 

Protected Attributes

ilRbacSystem $rbacsystem
 
ilLocatorGUI $locator
 
ilErrorHandling $error
 
ilTabsGUI $tabs
 
ilSkillTree $skill_tree
 
Tree SkillTreeManager $skill_tree_manager
 
Node SkillTreeNodeManager $skill_tree_node_manager
 
Access SkillTreeAccess $skill_tree_access_manager
 
Access SkillManagementAccess $skill_management_access_manager
 
Node SkillDeletionManager $skill_deletion_manager
 
Usage SkillUsageManager $skill_usage_manager
 
ilSkillTreeRepository $skill_tree_repo
 
Tree SkillTreeFactory $skill_tree_factory
 
UIServices $ui
 
ilGlobalTemplateInterface $main_tpl
 
ScreenContext ContextServices $tool_context
 
Service SkillAdminGUIRequest $admin_gui_request
 
Service SkillUIService $skill_ui_service
 
int $requested_node_id = 0
 
int $requested_tref_id = 0
 
int $requested_templates_tree = 0
 
string $requested_skexpand = ""
 
bool $requested_tmpmode = false
 
array $requested_titles = []
 
array $requested_node_ids = []
 
string $requested_table_action = ""
 
array $requested_table_tree_ids = []
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSkillTreeGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)
Parameters
string | array$a_data
int$a_id
bool$a_call_by_reference
bool$a_prepare_output

Definition at line 88 of file class.ilObjSkillTreeGUI.php.

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ILIAS\Repository\object(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

93  {
94  global $DIC;
95 
96  $this->ctrl = $DIC->ctrl();
97  $this->rbacsystem = $DIC->rbac()->system();
98  $this->error = $DIC["ilErr"];
99  $this->access = $DIC->access();
100  $this->tabs = $DIC->tabs();
101  $this->lng = $DIC->language();
102  $this->settings = $DIC->settings();
103  $this->tpl = $DIC["tpl"];
104  $this->toolbar = $DIC->toolbar();
105  $this->user = $DIC->user();
106  $ilCtrl = $DIC->ctrl();
107  $this->ui = $DIC->ui();
108  $this->main_tpl = $DIC->ui()->mainTemplate();
109  $this->locator = $DIC["ilLocator"];
110  $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
111  $this->skill_ui_service = $DIC->skills()->ui();
112 
113  $this->type = "skee";
114  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
115 
116  $this->lng->loadLanguageModule('skmg');
117 
118  $this->skill_tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
119  $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
120  $this->skill_tree = $this->skill_tree_factory->getTreeById($this->object->getId());
121 
122  $ilCtrl->saveParameter($this, "node_id");
123 
124  $this->tool_context = $DIC->globalScreen()->tool()->context();
125 
126  $this->requested_node_id = $this->admin_gui_request->getNodeId();
127  $this->requested_tref_id = $this->admin_gui_request->getTrefId();
128  $this->requested_templates_tree = $this->admin_gui_request->getTemplatesTree();
129  $this->requested_skexpand = $this->admin_gui_request->getSkillExpand();
130  $this->requested_tmpmode = $this->admin_gui_request->getTemplateMode();
131  $this->requested_titles = $this->admin_gui_request->getTitles();
132  $this->requested_node_ids = $this->admin_gui_request->getNodeIds();
133  $this->requested_table_action = $this->admin_gui_request->getTableTreeAction();
134  $this->requested_table_tree_ids = $this->admin_gui_request->getTableTreeIds();
135  }
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilObjSkillTreeGUI::cancelDelete ( )

Definition at line 762 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\ctrl().

762  : void
763  {
764  $this->ctrl->redirectByClass("ilobjskillmanagementgui", "");
765  }
+ Here is the call graph for this function:

◆ collapseAll()

ilObjSkillTreeGUI::collapseAll ( bool  $a_redirect = true)

Definition at line 618 of file class.ilObjSkillTreeGUI.php.

References ilSession\get(), saveAllTitles(), and ilSession\set().

618  : void
619  {
620  $this->requested_skexpand = "";
621  $n_id = ($this->requested_node_id > 0)
622  ? $this->requested_node_id
623  : $this->skill_tree->readRootId();
624  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
625  $old = ilSession::get("skexpand");
626  foreach ($stree as $n) {
627  if (in_array($n["child"], $old) && $n["child"] != $n_id) {
628  $k = array_search($n["child"], $old);
629  unset($old[$k]);
630  }
631  }
632  ilSession::set("skexpand", $old);
633  $this->saveAllTitles(false);
634  }
static get(string $a_var)
saveAllTitles(bool $a_succ_mess=true)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ confirmedDelete()

ilObjSkillTreeGUI::confirmedDelete ( )

Definition at line 781 of file class.ilObjSkillTreeGUI.php.

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

781  : void
782  {
783  // delete all selected objects
784  foreach ($this->requested_node_ids as $id) {
785  $this->skill_deletion_manager->deleteNode($id, $this->skill_tree);
786  }
787  $this->skill_deletion_manager->updateProfileCompletions($this->skill_tree);
788 
789  // feedback
790  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
791  }
+ Here is the call graph for this function:

◆ confirmedDeleteTrees()

ilObjSkillTreeGUI::confirmedDeleteTrees ( )

Definition at line 767 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ILIAS\Repository\lng(), and ilCtrl\redirectByClass().

767  : void
768  {
769  $ctrl = $this->ctrl;
770 
771  // delete all selected trees
772  foreach ($this->requested_node_ids as $id) {
773  $this->skill_deletion_manager->deleteTree($id);
774  }
775 
776  // feedback
777  $this->main_tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
778  $ctrl->redirectByClass("ilobjskillmanagementgui", "");
779  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ create()

ilObjSkillTreeGUI::create ( )
protected

Definition at line 345 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$lng, $main_tpl, $tabs, $ui, ilTabsGUI\clearTargets(), getSkillManagementLink(), initTreeForm(), ILIAS\DI\UIServices\renderer(), ilTabsGUI\setBackTarget(), and ilLanguage\txt().

345  : void
346  {
347  $lng = $this->lng;
348  $tabs = $this->tabs;
349  $mtpl = $this->main_tpl;
350  $ui = $this->ui;
351 
352  $tabs->clearTargets();
354  $lng->txt("back"),
355  $this->getSkillManagementLink()
356  );
357 
358  $mtpl->setContent($ui->renderer()->render($this->initTreeForm()));
359  }
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...
initTreeForm(bool $edit=false)
ilLanguage $lng
ilGlobalTemplateInterface $main_tpl
renderer()
Get a renderer for UI components.
Definition: UIServices.php:43
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ delete()

ilObjSkillTreeGUI::delete ( )

Definition at line 461 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$tree, deleteNodes(), and ilTree\readRootId().

461  : void
462  {
463  $ctrl = $this->ctrl;
464 
465  if ($this->requested_table_action === "deleteTrees"
466  && !empty($this->requested_table_tree_ids)
467  && $this->requested_table_tree_ids[0] === "ALL_OBJECTS"
468  ) {
469  $all_trees = $this->skill_tree_manager->getTrees();
470  foreach ($all_trees as $tree_obj) {
471  $tree = $this->skill_tree_factory->getTreeById($tree_obj->getId());
472  $this->requested_node_ids[] = $tree->readRootId();
473  }
474  } elseif ($this->requested_table_action === "deleteTrees") {
475  $this->requested_node_ids = array_map("intval", $this->requested_table_tree_ids);
476  }
477 
478  $this->deleteNodes($this);
479  }
+ Here is the call graph for this function:

◆ deleteNodes()

ilObjSkillTreeGUI::deleteNodes ( object  $a_gui)

Definition at line 636 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilSkillTemplateReference\_lookupTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTemplateId(), ilSkillTemplateReference\_lookupTrefIdsForTopTemplateId(), ilSkillTreeNode\_lookupType(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilSkillTreeNodeFactory\getInstance(), ILIAS\Repository\lng(), ilTree\POS_FIRST_NODE, ilSession\set(), ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setOnScreenMessage(), and ilLanguage\txt().

Referenced by delete().

636  : void
637  {
638  $lng = $this->lng;
639  $tpl = $this->tpl;
640  $ilCtrl = $this->ctrl;
641  $ilTabs = $this->tabs;
642 
643  if (empty($this->requested_node_ids)) {
644  $tpl->setOnScreenMessage("info", $lng->txt("no_checkbox"), true);
645  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
646  }
647 
648  $ilTabs->clearTargets();
649 
650  // check usages
651  $mode = "";
652  $tree_ids = [];
653  $cskill_ids = [];
654  foreach ($this->requested_node_ids as $id) {
655  if (ilSkillTreeNode::_lookupType($id) == "skrt") {
656  if (!$this->skill_management_access_manager->hasCreateTreePermission()) {
657  return;
658  }
659  $mode = "tree";
660  $tree_node_id = $id;
661  $tree_ids[] = $tree_node_id;
662  }
663  if (in_array(ilSkillTreeNode::_lookupType($id), array("skll", "scat", "sktr"))) {
664  if ($mode == "templates") {
665  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
666  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
667  }
668  $mode = "basic";
669  $skill_id = $id;
670  $tref_id = 0;
671  if (ilSkillTreeNode::_lookupType($id) == "sktr") {
673  $tref_id = $id;
674  }
675  $cskill_ids[] = array("skill_id" => $skill_id, "tref_id" => $tref_id);
676  }
677  if (in_array(ilSkillTreeNode::_lookupType($id), array("sktp", "sctp"))) {
678  if ($mode == "basic") {
679  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
680  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
681  }
682  $mode = "templates";
683 
684  foreach (ilSkillTemplateReference::_lookupTrefIdsForTemplateId($id) as $tref_id) {
685  $cskill_ids[] = array("skill_id" => $id, "tref_id" => $tref_id);
686  }
687  }
688  // for cats, skills and template references, get "real" usages
689  // for skill and category templates check usage in references
690  }
691 
692  $usages = [];
693  if ($mode == "tree") {
694  $usages = $this->skill_usage_manager->getAllUsagesInfoOfTrees($tree_ids);
695  } elseif ($mode == "basic" || $mode == "templates") {
696  $usages = $this->skill_usage_manager->getAllUsagesInfoOfSubtrees($cskill_ids);
697  } else {
698  $tpl->setOnScreenMessage("failure", "Skill Deletion - type mismatch.", true);
699  $ilCtrl->redirectByClass("ilskilltreeadmingui", "listTrees");
700  }
701 
702  $usage_html = "";
703  if (count($usages) > 0) {
704  foreach ($usages as $k => $usage) {
705  $usages_ui = $this->skill_ui_service->getUsagesUI($k, $usage, $mode);
706  $usage_html .= $usages_ui->render() . "<br/><br/>";
707  }
708  $ilCtrl->saveParameter($a_gui, "tmpmode");
709  }
710 
711  // SAVE POST VALUES
712  ilSession::set("saved_post", $this->requested_node_ids);
713 
714  $confirmation_gui = new ilConfirmationGUI();
715 
716  $ilCtrl->setParameter($a_gui, "tmpmode", (int) $this->requested_tmpmode);
717  $a_form_action = $this->ctrl->getFormAction($a_gui);
718  $confirmation_gui->setFormAction($a_form_action);
719  if (count($usages) > 0) {
720  $confirmation_text = $this->lng->txt("skmg_delete_warning");
721  } else {
722  $confirmation_text = $this->lng->txt("info_delete_sure");
723  }
724  $confirmation_gui->setHeaderText($confirmation_text);
725 
726  // Add items to delete
727  foreach ($this->requested_node_ids as $id) {
728  if ($id != ilTree::POS_FIRST_NODE) {
729  $node_obj = ilSkillTreeNodeFactory::getInstance($id);
730  if ($mode == "tree") {
731  $tree_id = $this->skill_tree_repo->getTreeIdForNodeId($id);
732  $tree_obj = $this->skill_tree_manager->getTree($tree_id);
733  $obj_title = $tree_obj->getTitle();
734  } else {
735  $obj_title = (!in_array($node_obj->getType(), ["sktp", "sctp"]))
736  ? $node_obj->getTitle()
737  : $node_obj->getTitle() .
738  " (" .
739  $this->lng->txt("skmg_count_references") . " " .
741  ")";
742  }
743  $confirmation_gui->addItem(
744  "id[]",
745  (string) $node_obj->getId(),
746  $obj_title,
747  ilUtil::getImagePath("standard/icon_" . $node_obj->getType() . ".svg")
748  );
749  }
750  }
751 
752  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelDelete");
753  if ($mode == "tree") {
754  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDeleteTrees");
755  } else {
756  $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
757  }
758 
759  $tpl->setContent($confirmation_gui->getHTML() . $usage_html);
760  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _lookupType(int $a_obj_id)
const POS_FIRST_NODE
ilLanguage $lng
static _lookupTrefIdsForTopTemplateId(int $a_template_id)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ edit()

ilObjSkillTreeGUI::edit ( )
protected

Definition at line 361 of file class.ilObjSkillTreeGUI.php.

References $main_tpl, $tabs, $ui, ilTabsGUI\activateTab(), initTreeForm(), and ILIAS\DI\UIServices\renderer().

361  : void
362  {
363  $tabs = $this->tabs;
364  $tabs->activateTab("settings");
365  $mtpl = $this->main_tpl;
366  $ui = $this->ui;
367 
368  if (!$this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
369  return;
370  }
371 
372  $mtpl->setContent($ui->renderer()->render($this->initTreeForm(true)));
373  }
initTreeForm(bool $edit=false)
ilGlobalTemplateInterface $main_tpl
renderer()
Get a renderer for UI components.
Definition: UIServices.php:43
activateTab(string $a_id)
+ Here is the call graph for this function:

◆ editSkills()

ilObjSkillTreeGUI::editSkills ( )

Definition at line 541 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ILIAS\Repository\int(), and ilCtrl\setParameter().

541  : void
542  {
543  $tpl = $this->tpl;
544  $ilTabs = $this->tabs;
545  $lng = $this->lng;
546  $ilCtrl = $this->ctrl;
547 
548  $ilTabs->activateTab("skills");
549 
550  if ($this->requested_table_action === "editTree" && !empty($this->requested_table_tree_ids)) {
551  $node_id = (int) $this->requested_table_tree_ids[0];
552  $tree_id = $this->skill_tree_repo->getTreeIdForNodeId($node_id);
553  $tree_obj = $this->skill_tree_manager->getTree($tree_id);
554  $ilCtrl->setParameter($this, "ref_id", $tree_obj->getRefId());
555  $ilCtrl->setParameter($this, "node_id", $node_id);
556  } else {
557  $ilCtrl->setParameter($this, "node_id", $this->skill_tree->readRootId());
558  }
559 
560  $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
561  }
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ editSkillTemplates()

ilObjSkillTreeGUI::editSkillTemplates ( )

Definition at line 797 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, and ilCtrl\setParameter().

797  : void
798  {
799  $tpl = $this->tpl;
800  $ilTabs = $this->tabs;
801  $lng = $this->lng;
802  $ilCtrl = $this->ctrl;
803 
804  $ilTabs->activateTab("skill_templates");
805  $ilCtrl->setParameter($this, "node_id", $this->skill_tree->readRootId());
806  $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
807  }
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjSkillTreeGUI::executeCommand ( )

Definition at line 149 of file class.ilObjSkillTreeGUI.php.

References $error, $ilErr, $rbacsystem, $tabs, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilObjectGUI\prepareOutput(), showLocator(), and showTree().

149  : void
150  {
153  $ilTabs = $this->tabs;
154 
155  $next_class = $this->ctrl->getNextClass($this);
156  $cmd = $this->ctrl->getCmd();
157 
158  $this->prepareOutput();
159  $this->showLocator();
160 
161 
162  if (!$this->skill_tree_access_manager->hasReadTreePermission()) {
163  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
164  }
165 
166  switch ($next_class) {
167  case 'ilskillrootgui':
168  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
169  return;
170  }
171  $skrt_gui = new ilSkillRootGUI(
172  $this->skill_tree_node_manager,
173  $this->requested_node_id
174  );
175  $skrt_gui->setParentGUI($this);
176  $ret = $this->ctrl->forwardCommand($skrt_gui);
177  break;
178 
179  case 'ilskillcategorygui':
180  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
181  return;
182  }
183  $this->tabs_gui->activateTab("skills");
184  $scat_gui = new ilSkillCategoryGUI(
185  $this->skill_tree_node_manager,
186  $this->requested_node_id
187  );
188  $scat_gui->setParentGUI($this);
189  $this->showTree(false, $scat_gui, "listItems");
190  $ret = $this->ctrl->forwardCommand($scat_gui);
191  break;
192 
193  case 'ilbasicskillgui':
194  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
195  return;
196  }
197  $this->tabs_gui->activateTab("skills");
198  $skill_gui = new ilBasicSkillGUI(
199  $this->skill_tree_node_manager,
200  $this->requested_node_id
201  );
202  $skill_gui->setParentGUI($this);
203  $this->showTree(false, $skill_gui, "edit");
204  $ret = $this->ctrl->forwardCommand($skill_gui);
205  break;
206 
207  case 'ilskilltemplatecategorygui':
208  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
209  return;
210  }
211  $this->tabs_gui->activateTab("skill_templates");
212  $sctp_gui = new ilSkillTemplateCategoryGUI(
213  $this->skill_tree_node_manager,
214  $this->requested_node_id,
215  $this->requested_tref_id
216  );
217  $sctp_gui->setParentGUI($this);
218  $this->showTree(($this->requested_tref_id == 0), $sctp_gui, "listItems");
219  $ret = $this->ctrl->forwardCommand($sctp_gui);
220  break;
221 
222  case 'ilbasicskilltemplategui':
223  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
224  return;
225  }
226  $this->tabs_gui->activateTab("skill_templates");
227  $sktp_gui = new ilBasicSkillTemplateGUI(
228  $this->skill_tree_node_manager,
229  $this->requested_node_id,
230  $this->requested_tref_id
231  );
232  $sktp_gui->setParentGUI($this);
233  $this->showTree(($this->requested_tref_id == 0), $sktp_gui, "edit");
234  $ret = $this->ctrl->forwardCommand($sktp_gui);
235  break;
236 
237  case 'ilskilltemplatereferencegui':
238  if (!$this->skill_tree_access_manager->hasReadCompetencesPermission()) {
239  return;
240  }
241  $this->tabs_gui->activateTab("skills");
242  $sktr_gui = new ilSkillTemplateReferenceGUI(
243  $this->skill_tree_node_manager,
244  $this->requested_tref_id
245  );
246  $sktr_gui->setParentGUI($this);
247  $this->showTree(false, $sktr_gui, "listItems");
248  $ret = $this->ctrl->forwardCommand($sktr_gui);
249  break;
250 
251  case "ilskillprofilegui":
252  if (!$this->skill_tree_access_manager->hasReadProfilesPermission()) {
253  return;
254  }
255  $ilTabs->activateTab("profiles");
256  $skprof_gui = new ilSkillProfileGUI(
257  $this->skill_tree_access_manager,
258  $this->skill_tree->getTreeId()
259  );
260  $ret = $this->ctrl->forwardCommand($skprof_gui);
261  break;
262 
263  case "ilskillprofileuploadhandlergui":
264  $skprof_upl_gui = new ilSkillProfileUploadHandlerGUI();
265  $ret = $this->ctrl->forwardCommand($skprof_upl_gui);
266  break;
267 
268  case 'ilpermissiongui':
269  if (!$this->skill_tree_access_manager->hasEditTreePermissionsPermission()) {
270  return;
271  }
272  $this->tabs_gui->activateTab('permissions');
273  $perm_gui = new ilPermissionGUI($this);
274  $ret = $this->ctrl->forwardCommand($perm_gui);
275  break;
276 
277  case "ilexportgui":
278  if (!$this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
279  return;
280  }
281  $this->tabs_gui->activateTab('export');
282  $exp_gui = new ilExportGUI($this);
283  $exp_gui->addFormat("xml");
284  //$exp_gui->addFormat("html", "", $this, "exportHTML");
285  $this->object->setType("skmg");
286  $ret = $this->ctrl->forwardCommand($exp_gui);
287  $this->object->setType("skee");
288  break;
289 
290  default:
291  if (!$cmd || $cmd == 'view') {
292  $cmd = "editSkills";
293  }
294 
295  if ($cmd == "showTree") {
296  $this->showTree((bool) $this->requested_templates_tree);
297  } else {
298  $this->$cmd();
299  }
300  break;
301  }
302  }
Skill category GUI class.
Skill root GUI class.
Skill profile GUI class.
Class ilSkillProfileUploadHandlerGUI.
prepareOutput(bool $show_sub_objects=true)
showTree(bool $a_templates, $a_gui="", $a_gui_cmd="")
$ilErr
Definition: raiseError.php:17
Export User Interface Class.
Skill template reference GUI class.
Skill template category GUI class.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Basic skill GUI class.
Basic skill template GUI class.
+ Here is the call graph for this function:

◆ expandAll()

ilObjSkillTreeGUI::expandAll ( bool  $a_redirect = true)

Definition at line 603 of file class.ilObjSkillTreeGUI.php.

References saveAllTitles(), and ilSession\set().

603  : void
604  {
605  $this->requested_skexpand = "";
606  $n_id = ($this->requested_node_id > 0)
607  ? $this->requested_node_id
608  : $this->skill_tree->readRootId();
609  $stree = $this->skill_tree->getSubTree($this->skill_tree->getNodeData($n_id));
610  $n_arr = [];
611  foreach ($stree as $n) {
612  $n_arr[] = $n["child"];
613  ilSession::set("skexpand", $n_arr);
614  }
615  $this->saveAllTitles(false);
616  }
saveAllTitles(bool $a_succ_mess=true)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSkillTreeGUI::getAdminTabs ( )

Definition at line 481 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$access, ilObjectGUI\$lng, $rbacsystem, ILIAS\Repository\ctrl(), getSkillManagementLink(), and ilLanguage\txt().

481  : void
482  {
484  $ilAccess = $this->access;
485  $lng = $this->lng;
486 
487 
488  $this->tabs_gui->setBackTarget(
489  $lng->txt("skmg_skill_trees"),
490  $this->getSkillManagementLink()
491  );
492 
493  if ($this->skill_tree_access_manager->hasReadTreePermission()) {
494  if ($this->skill_tree_access_manager->hasReadCompetencesPermission()) {
495  $this->tabs_gui->addTab(
496  "skills",
497  $lng->txt("skmg_skills"),
498  $this->ctrl->getLinkTarget($this, "editSkills")
499  );
500  $this->tabs_gui->addTab(
501  "skill_templates",
502  $lng->txt("skmg_skill_templates"),
503  $this->ctrl->getLinkTarget($this, "editSkillTemplates")
504  );
505  }
506 
507  if ($this->skill_tree_access_manager->hasReadProfilesPermission()) {
508  $this->tabs_gui->addTab(
509  "profiles",
510  $lng->txt("skmg_skill_profiles"),
511  $this->ctrl->getLinkTargetByClass("ilskillprofilegui")
512  );
513  }
514 
515  if ($this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
516  $this->tabs_gui->addTab(
517  "settings",
518  $lng->txt("settings"),
519  $this->ctrl->getLinkTarget($this, "edit")
520  );
521  }
522 
523  if ($this->skill_tree_access_manager->hasEditTreeSettingsPermission()) {
524  $this->tabs_gui->addTab(
525  "export",
526  $lng->txt("export"),
527  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
528  );
529  }
530  }
531 
532  if ($this->skill_tree_access_manager->hasEditTreePermissionsPermission()) {
533  $this->tabs_gui->addTab(
534  "permissions",
535  $lng->txt("perm_settings"),
536  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
537  );
538  }
539  }
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...
ilLanguage $lng
ilAccessHandler $access
+ Here is the call graph for this function:

◆ getSkillManagementLink()

ilObjSkillTreeGUI::getSkillManagementLink ( )
protected

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

References ILIAS\Repository\ctrl().

Referenced by create(), getAdminTabs(), save(), and showLocator().

334  : string
335  {
336  $this->ctrl->clearParametersByClass("ilobjskillmanagementgui");
337  $this->ctrl->setParameterByClass(
338  "ilobjskillmanagementgui",
339  "ref_id",
340  $this->skill_tree_manager->getSkillManagementRefId()
341  );
342  return $this->ctrl->getLinkTargetByClass("ilobjskillmanagementgui", "");
343  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

ilObjSkillTreeGUI::init ( Service\SkillInternalManagerService  $skill_manager)

Definition at line 137 of file class.ilObjSkillTreeGUI.php.

References ILIAS\Repository\object().

137  : void
138  {
139  $this->skill_tree_manager = $skill_manager->getTreeManager();
140  $this->skill_tree_node_manager = $skill_manager->getTreeNodeManager($this->object->getId());
141  $this->skill_tree_access_manager = $skill_manager->getTreeAccessManager($this->object->getRefId());
142  $this->skill_management_access_manager = $skill_manager->getManagementAccessManager(
143  $this->skill_tree_manager->getSkillManagementRefId()
144  );
145  $this->skill_deletion_manager = $skill_manager->getDeletionManager();
146  $this->skill_usage_manager = $skill_manager->getUsageManager();
147  }
+ Here is the call graph for this function:

◆ initTreeForm()

ilObjSkillTreeGUI::initTreeForm ( bool  $edit = false)

Definition at line 375 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, Vendor\Package\$f, ilObjectGUI\$form_action, ilObjectGUI\$lng, $ui, ILIAS\DI\UIServices\factory(), ilCtrl\getLinkTarget(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by create(), edit(), and save().

375  : Form\Standard
376  {
377  $ui = $this->ui;
378  $f = $ui->factory();
379  $ctrl = $this->ctrl;
380  $lng = $this->lng;
381 
382  $fields["title"] = $f->input()->field()->text($lng->txt("title"))->withRequired(true);
383  if ($edit) {
384  $fields["title"] = $fields["title"]->withValue($this->object->getTitle());
385  }
386 
387  $fields["description"] = $f->input()->field()->textarea($lng->txt("description"));
388  if ($edit) {
389  $fields["description"] = $fields["description"]->withValue($this->object->getDescription());
390  }
391 
392  // section
393  $section1 = $f->input()->field()->section($fields, $lng->txt("skmg_add_skill_tree"));
394 
395  if ($edit) {
396  $form_action = $ctrl->getLinkTarget($this, "update");
397  } else {
398  $form_action = $ctrl->getLinkTarget($this, "save");
399  }
400  return $f->input()->container()->form()->standard($form_action, ["props" => $section1]);
401  }
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...
ilLanguage $lng
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjSkillTreeGUI::save ( )

Definition at line 403 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$data, ilObjectGUI\$lng, $object, ilObjectGUI\$request, $tabs, ilObjectGUI\$tpl, $ui, ilTabsGUI\clearTargets(), getSkillManagementLink(), initTreeForm(), ilCtrl\redirect(), ilCtrl\redirectByClass(), ILIAS\DI\UIServices\renderer(), ilTabsGUI\setBackTarget(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

403  : void
404  {
406  $form = $this->initTreeForm();
407  $lng = $this->lng;
408  $ctrl = $this->ctrl;
409  $tabs = $this->tabs;
410  $tpl = $this->tpl;
411  $ui = $this->ui;
412 
413  if ($request->getMethod() == "POST") {
414  $form = $form->withRequest($request);
415  $data = $form->getData();
416  if (isset($data["props"]) && is_array($data["props"])) {
417  $props = $data["props"];
418  $this->skill_tree_manager->createTree(
419  $props["title"],
420  $props["description"]
421  );
422  $this->main_tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
423  } else {
424  $tpl->setContent($ui->renderer()->render($form));
425  $tabs->clearTargets();
427  $lng->txt("back"),
428  $this->getSkillManagementLink()
429  );
430  return;
431  }
432  }
433  $ctrl->redirectByClass("ilskillrootgui", "listSkills");
434  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
initTreeForm(bool $edit=false)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
ServerRequestInterface $request
renderer()
Get a renderer for UI components.
Definition: UIServices.php:43
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ saveAllTemplateTitles()

ilObjSkillTreeGUI::saveAllTemplateTitles ( bool  $a_succ_mess = true)

Definition at line 583 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$lng, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), ilUtil\stripSlashes(), and ilLanguage\txt().

583  : void
584  {
585  $ilCtrl = $this->ctrl;
586  $lng = $this->lng;
587 
588  if (!count($this->requested_titles) == 0) {
589  foreach ($this->requested_titles as $id => $title) {
591  if (is_object($node_obj)) {
592  // update title
594  }
595  }
596  if ($a_succ_mess) {
597  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
598  }
599  }
600  $ilCtrl->redirect($this, "editSkillTemplates");
601  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
ilLanguage $lng
static _writeTitle(int $a_obj_id, string $a_title)
+ Here is the call graph for this function:

◆ saveAllTitles()

ilObjSkillTreeGUI::saveAllTitles ( bool  $a_succ_mess = true)

Definition at line 563 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$id, ilObjectGUI\$lng, ilSkillTreeNode\_writeTitle(), ilSkillTreeNodeFactory\getInstance(), ilUtil\stripSlashes(), and ilLanguage\txt().

Referenced by collapseAll(), and expandAll().

563  : void
564  {
565  $ilCtrl = $this->ctrl;
566  $lng = $this->lng;
567 
568  if (!count($this->requested_titles) == 0) {
569  foreach ($this->requested_titles as $id => $title) {
571  if (is_object($node_obj)) {
572  // update title
574  }
575  }
576  if ($a_succ_mess) {
577  $this->main_tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
578  }
579  }
580  $ilCtrl->redirect($this, "editSkills");
581  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
ilLanguage $lng
static _writeTitle(int $a_obj_id, string $a_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLocator()

ilObjSkillTreeGUI::showLocator ( )
protected

Definition at line 304 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, $locator, ilLocatorGUI\addItem(), ilLocatorGUI\clearItems(), ILIAS\Repository\ctrl(), getSkillManagementLink(), ILIAS\Repository\lng(), ilCtrl\setParameterByClass(), and SYSTEM_FOLDER_ID.

Referenced by executeCommand().

304  : void
305  {
306  $ctrl = $this->ctrl;
308 
309  $locator->clearItems();
310 
312  "ilobjsystemfoldergui",
313  "ref_id",
315  );
316  $locator->addItem(
317  $this->lng->txt("administration"),
318  $this->ctrl->getLinkTargetByClass(array("iladministrationgui", "ilobjsystemfoldergui"), "")
319  );
320  $locator->addItem(
321  $this->lng->txt("obj_skmg"),
322  $this->getSkillManagementLink()
323  );
324 
325  /*
326  if ($this->object && ($this->object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object)) {
327  $ilLocator->addItem(
328  $this->object->getTitle(),
329  $this->ctrl->getLinkTarget($this, "view")
330  );
331  }*/
332  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
const SYSTEM_FOLDER_ID
Definition: constants.php:35
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTree()

ilObjSkillTreeGUI::showTree ( bool  $a_templates,
  $a_gui = "",
  $a_gui_cmd = "" 
)

Definition at line 813 of file class.ilObjSkillTreeGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $path, ilObjectGUI\$tpl, ilObjectGUI\$user, ilSkillTreeNode\_lookupType(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setLeftNavContent(), ilSkillGSToolProvider\SHOW_SKILL_TREE, ilSkillGSToolProvider\SHOW_TEMPLATE_TREE, and ilSkillGSToolProvider\SKILL_TREE_ID.

Referenced by executeCommand().

813  : void
814  {
815  $ilUser = $this->user;
816  $tpl = $this->tpl;
817  $ilCtrl = $this->ctrl;
818  $lng = $this->lng;
819 
820  if ($a_templates) {
821  if ($this->requested_node_id == 0 || $this->requested_node_id == $this->skill_tree->readRootId()) {
822  return;
823  }
824 
825  if ($this->requested_node_id != $this->skill_tree->readRootId()) {
826  $path = $this->skill_tree->getPathId($this->requested_node_id);
827  if (ilSkillTreeNode::_lookupType($path[1]) == "sktp") {
828  return;
829  }
830  }
831  }
832 
833  $ilCtrl->setParameter($this, "templates_tree", (int) $a_templates);
834 
835  if ($a_templates) {
836  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_TEMPLATE_TREE, true);
837  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SKILL_TREE_ID, $this->object->getId());
838  $exp = new ilSkillTemplateTreeExplorerGUI($this, "showTree", $this->object->getId());
839  } else {
840  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SHOW_SKILL_TREE, true);
841  $this->tool_context->current()->addAdditionalData(ilSkillGSToolProvider::SKILL_TREE_ID, $this->object->getId());
842  $exp = new ilSkillTreeExplorerGUI($this, "showTree", $this->object->getId());
843  }
844  if (!$exp->handleCommand()) {
845  $tpl->setLeftNavContent($exp->getHTML());
846  }
847  }
Explorer class that works on tree objects (Services/Tree)
static _lookupType(int $a_obj_id)
$path
Definition: ltiservices.php:32
ilLanguage $lng
ilGlobalTemplateInterface $tpl
Explorer class that works on tree objects (Services/Tree)
setLeftNavContent(string $a_content)
Sets content of left navigation column.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_gui_request

Service SkillAdminGUIRequest ilObjSkillTreeGUI::$admin_gui_request
protected

Definition at line 57 of file class.ilObjSkillTreeGUI.php.

◆ $error

ilErrorHandling ilObjSkillTreeGUI::$error
protected

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

Referenced by executeCommand().

◆ $locator

ilLocatorGUI ilObjSkillTreeGUI::$locator
protected

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

Referenced by showLocator().

◆ $main_tpl

ilGlobalTemplateInterface ilObjSkillTreeGUI::$main_tpl
protected

Definition at line 55 of file class.ilObjSkillTreeGUI.php.

Referenced by create(), and edit().

◆ $object

ilObject ilObjSkillTreeGUI::$object

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

Referenced by save().

◆ $rbacsystem

ilRbacSystem ilObjSkillTreeGUI::$rbacsystem
protected

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

Referenced by executeCommand(), and getAdminTabs().

◆ $requested_node_id

int ilObjSkillTreeGUI::$requested_node_id = 0
protected

Definition at line 59 of file class.ilObjSkillTreeGUI.php.

◆ $requested_node_ids

array ilObjSkillTreeGUI::$requested_node_ids = []
protected

Definition at line 73 of file class.ilObjSkillTreeGUI.php.

◆ $requested_skexpand

string ilObjSkillTreeGUI::$requested_skexpand = ""
protected

Definition at line 62 of file class.ilObjSkillTreeGUI.php.

◆ $requested_table_action

string ilObjSkillTreeGUI::$requested_table_action = ""
protected

Definition at line 75 of file class.ilObjSkillTreeGUI.php.

◆ $requested_table_tree_ids

array ilObjSkillTreeGUI::$requested_table_tree_ids = []
protected

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

◆ $requested_templates_tree

int ilObjSkillTreeGUI::$requested_templates_tree = 0
protected

Definition at line 61 of file class.ilObjSkillTreeGUI.php.

◆ $requested_titles

array ilObjSkillTreeGUI::$requested_titles = []
protected

Definition at line 68 of file class.ilObjSkillTreeGUI.php.

◆ $requested_tmpmode

bool ilObjSkillTreeGUI::$requested_tmpmode = false
protected

Definition at line 63 of file class.ilObjSkillTreeGUI.php.

◆ $requested_tref_id

int ilObjSkillTreeGUI::$requested_tref_id = 0
protected

Definition at line 60 of file class.ilObjSkillTreeGUI.php.

◆ $skill_deletion_manager

Node SkillDeletionManager ilObjSkillTreeGUI::$skill_deletion_manager
protected

Definition at line 50 of file class.ilObjSkillTreeGUI.php.

◆ $skill_management_access_manager

Access SkillManagementAccess ilObjSkillTreeGUI::$skill_management_access_manager
protected

Definition at line 49 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree

ilSkillTree ilObjSkillTreeGUI::$skill_tree
protected

Definition at line 45 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_access_manager

Access SkillTreeAccess ilObjSkillTreeGUI::$skill_tree_access_manager
protected

Definition at line 48 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_factory

Tree SkillTreeFactory ilObjSkillTreeGUI::$skill_tree_factory
protected

Definition at line 53 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_manager

Tree SkillTreeManager ilObjSkillTreeGUI::$skill_tree_manager
protected

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

◆ $skill_tree_node_manager

Node SkillTreeNodeManager ilObjSkillTreeGUI::$skill_tree_node_manager
protected

Definition at line 47 of file class.ilObjSkillTreeGUI.php.

◆ $skill_tree_repo

ilSkillTreeRepository ilObjSkillTreeGUI::$skill_tree_repo
protected

Definition at line 52 of file class.ilObjSkillTreeGUI.php.

◆ $skill_ui_service

Service SkillUIService ilObjSkillTreeGUI::$skill_ui_service
protected

Definition at line 58 of file class.ilObjSkillTreeGUI.php.

◆ $skill_usage_manager

Usage SkillUsageManager ilObjSkillTreeGUI::$skill_usage_manager
protected

Definition at line 51 of file class.ilObjSkillTreeGUI.php.

◆ $tabs

ilTabsGUI ilObjSkillTreeGUI::$tabs
protected

◆ $tool_context

ScreenContext ContextServices ilObjSkillTreeGUI::$tool_context
protected

Definition at line 56 of file class.ilObjSkillTreeGUI.php.

◆ $ui

UIServices ilObjSkillTreeGUI::$ui
protected

Definition at line 54 of file class.ilObjSkillTreeGUI.php.

Referenced by create(), edit(), initTreeForm(), and save().


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