ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 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...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Protected Attributes

 $title_modifier = null
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $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
string$form

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

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

31  {
32  global $DIC;
33 
34  $this->ctrl = $DIC->ctrl();
35  $ilCtrl = $DIC->ctrl();
36  $this->multi_nodes = $a_multi;
37  $this->postvar = $a_postvar;
38 
39  include_once("./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
40  $this->explorer_gui = new ilRepositorySelectorExplorerGUI(
41  [$form, ilFormPropertyDispatchGUI::class, ilRepositorySelector2InputGUI::class],
42  $this->getExplHandleCmd(),
43  $this,
44  "selectRepositoryItem",
45  "root_id",
46  "rep_exp_sel_" . $a_postvar
47  );
48  // $this->explorer_gui->setTypeWhiteList($this->getVisibleTypes());
49  // $this->explorer_gui->setClickableTypes($this->getClickableTypes());
50  $this->explorer_gui->setSelectMode($a_postvar . "_sel", $this->multi_nodes);
51  //$this->explorer_gui = new ilTaxonomyExplorerGUI(array("ilformpropertydispatchgui", "iltaxselectinputgui"), $this->getExplHandleCmd(), $a_taxonomy_id, "", "",
52  // "tax_expl_".$a_postvar);
53 
54  parent::__construct($a_title, $a_postvar, $this->explorer_gui, $this->multi_nodes);
55  $this->setType("rep_select");
56  }
Explorer for selecting repository items.
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
setType($a_type)
Set Type.
if(isset($_POST['submit'])) $form
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 103 of file class.ilRepositorySelector2InputGUI.php.

Referenced by ilCourseLPBadgeGUI\initConfigForm().

104  {
105  return $this->explorer_gui;
106  }
+ Here is the caller graph for this function:

◆ getHTML()

ilRepositorySelector2InputGUI::getHTML ( )

Get HTML.

Parameters

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

References ilFormPropertyGUI\$ctrl, $html, and $ilCtrl.

115  {
117  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
118  $html = parent::getHTML();
119  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $_REQUEST["postvar"]);
120  return $html;
121  }
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 91 of file class.ilRepositorySelector2InputGUI.php.

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

92  {
93  $c = $this->getTitleModifier();
94  if (is_callable($c)) {
95  return $c($a_id);
96  }
98  }
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 80 of file class.ilRepositorySelector2InputGUI.php.

References $title_modifier.

Referenced by getTitleForNodeId().

+ Here is the caller graph for this function:

◆ render()

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

Render item.

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

References ilFormPropertyGUI\$ctrl, and $ilCtrl.

127  {
129  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
130  return parent::render($a_mode);
131  $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $_REQUEST["postvar"]);
132  }
global $ilCtrl
Definition: ilias.php:18

◆ setTitleModifier()

ilRepositorySelector2InputGUI::setTitleModifier ( callable  $a_val)

Set title modifier.

Parameters
callable$a_val

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

Referenced by ilCourseLPBadgeGUI\initConfigForm().

64  {
65  $this->title_modifier = $a_val;
66  if ($a_val != null) {
67  $this->explorer_gui->setNodeContentModifier(function ($a_node) use ($a_val) {
68  return $a_val($a_node["child"]);
69  });
70  } else {
71  $this->explorer_gui->setNodeContentModifier(null);
72  }
73  }
+ 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: