ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilRepositorySelector2InputGUI Class Reference

Select repository nodes. More...

+ Inheritance diagram for ilRepositorySelector2InputGUI:
+ Collaboration diagram for ilRepositorySelector2InputGUI:

Public Member Functions

 __construct ($a_title, $a_postvar, $a_multi=false, $form=ilPropertyFormGUI::class)
 Constructor. More...
 
 setTitleModifier (callable $a_val)
 Set title modifier. More...
 
 getTitleModifier ()
 Get title modifier. More...
 
 getTitleForNodeId ($a_id)
 Get title for node id (needs to be overwritten, if explorer is not a tree eplorer. More...
 
 handleExplorerCommand ()
 Handle explorer command. More...
 
 getExplorerGUI ()
 
 getHTML ()
 Get HTML. More...
 
 render ($a_mode="property_form")
 Render item. More...
 
- Public Member Functions inherited from ilExplorerSelectInputGUI
 __construct ($a_title, $a_postvar, $a_explorer_gui, $a_multi=false)
 Constructor. More...
 
 getExplHandleCmd ()
 Get explorer handle command function. More...
 
 handleExplorerCommand ()
 Handle explorer command. More...
 
 getTitleForNodeId ($a_id)
 Get title for node id (needs to be overwritten, if explorer is not a tree eplorer. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 render ($a_mode="property_form")
 Render item. More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Protected Attributes

 $title_modifier = null
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilRepositorySelector2InputGUI::__construct (   $a_title,
  $a_postvar,
  $a_multi = false,
  $form = ilPropertyFormGUI::class 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

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

References $ilCtrl, ilExplorerSelectInputGUI\getExplHandleCmd(), and ilFormPropertyGUI\setType().

30  {
31  global $ilCtrl;
32 
33  $this->multi_nodes = $a_multi;
34  $this->postvar = $a_postvar;
35 
36  include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
37  $this->explorer_gui = new ilRepositorySelectorExplorerGUI([$form, ilFormPropertyDispatchGUI::class, ilRepositorySelector2InputGUI::class],
38  $this->getExplHandleCmd(), $this, "selectRepositoryItem", "root_id", "rep_exp_sel_".$a_postvar);
39 // $this->explorer_gui->setTypeWhiteList($this->getVisibleTypes());
40 // $this->explorer_gui->setClickableTypes($this->getClickableTypes());
41  $this->explorer_gui->setSelectMode($a_postvar."_sel", $this->multi_nodes);
42  //$this->explorer_gui = new ilTaxonomyExplorerGUI(array("ilformpropertydispatchgui", "iltaxselectinputgui"), $this->getExplHandleCmd(), $a_taxonomy_id, "", "",
43  // "tax_expl_".$a_postvar);
44 
45  parent::__construct($a_title, $a_postvar, $this->explorer_gui, $this->multi_nodes);
46  $this->setType("rep_select");
47  }
Explorer for selecting repository items.
global $ilCtrl
Definition: ilias.php:18
setType($a_type)
Set Type.
getExplHandleCmd()
Get explorer handle command function.
+ Here is the call graph for this function:

Member Function Documentation

◆ getExplorerGUI()

ilRepositorySelector2InputGUI::getExplorerGUI ( )
Returns
ilRepositorySelectorExplorerGUI

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

Referenced by ilCourseLPBadgeGUI\initConfigForm(), and ilDidacticTemplateSettingsGUI\initEditTemplate().

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

◆ getHTML()

ilRepositorySelector2InputGUI::getHTML ( )

Get HTML.

Parameters

Definition at line 120 of file class.ilRepositorySelector2InputGUI.php.

References $html, and $ilCtrl.

121  {
122  global $ilCtrl;
123  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
124  $html = parent::getHTML();
125  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $_REQUEST["postvar"]);
126  return $html;
127  }
global $ilCtrl
Definition: ilias.php:18
$html
Definition: example_001.php:87

◆ getTitleForNodeId()

ilRepositorySelector2InputGUI::getTitleForNodeId (   $a_id)

Get title for node id (needs to be overwritten, if explorer is not a tree eplorer.

Parameters

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

References ilObject\_lookupObjId(), ilObject\_lookupTitle(), and getTitleModifier().

86  {
87  $c = $this->getTitleModifier();
88  if (is_callable($c))
89  {
90  return $c($a_id);
91  }
93  }
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ getTitleModifier()

ilRepositorySelector2InputGUI::getTitleModifier ( )

Get title modifier.

Returns
callable

Definition at line 74 of file class.ilRepositorySelector2InputGUI.php.

References $title_modifier.

Referenced by getTitleForNodeId().

+ Here is the caller graph for this function:

◆ handleExplorerCommand()

ilRepositorySelector2InputGUI::handleExplorerCommand ( )

Handle explorer command.

Definition at line 98 of file class.ilRepositorySelector2InputGUI.php.

99  {
100  if ($this->explorer_gui->handleCommand())
101  {
102 // exit;
103  }
104  }

◆ render()

ilRepositorySelector2InputGUI::render (   $a_mode = "property_form")

Render item.

Definition at line 132 of file class.ilRepositorySelector2InputGUI.php.

References $ilCtrl.

133  {
134  global $ilCtrl;
135  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
136  return parent::render($a_mode);
137  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $_REQUEST["postvar"]);
138  }
global $ilCtrl
Definition: ilias.php:18

◆ setTitleModifier()

ilRepositorySelector2InputGUI::setTitleModifier ( callable  $a_val)

Set title modifier.

Parameters
callable$a_val

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

Referenced by ilCourseLPBadgeGUI\initConfigForm().

55  {
56  $this->title_modifier = $a_val;
57  if ($a_val != null)
58  {
59  $this->explorer_gui->setNodeContentModifier(function ($a_node) use ($a_val) {
60  return $a_val($a_node["child"]);
61  });
62  }
63  else
64  {
65  $this->explorer_gui->setNodeContentModifier(null);
66  }
67  }
+ Here is the caller graph for this function:

Field Documentation

◆ $title_modifier

ilRepositorySelector2InputGUI::$title_modifier = null
protected

Definition at line 21 of file class.ilRepositorySelector2InputGUI.php.

Referenced by getTitleModifier().


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