ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. 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

Select repository nodes.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_IsCalledBy ilRepositorySelector2InputGUI: ilFormPropertyDispatchGUI

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

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

Reimplemented from ilExplorerSelectInputGUI.

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

30 {
31 global $DIC;
32
33 $this->ctrl = $DIC->ctrl();
34 $ilCtrl = $DIC->ctrl();
35
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 }
getExplHandleCmd()
Get explorer handle command function.
setType($a_type)
Set Type.
Explorer for selecting repository items.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
global $DIC
Definition: saml.php:7

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getExplorerGUI()

ilRepositorySelector2InputGUI::getExplorerGUI ( )
Returns
ilRepositorySelectorExplorerGUI

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

114 {
115 return $this->explorer_gui;
116 }

◆ getHTML()

ilRepositorySelector2InputGUI::getHTML ( )

Get HTML.

Parameters

return

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

125 {
127 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
128 $html = parent::getHTML();
129 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $_REQUEST["postvar"]);
130 return $html;
131 }
$html
Definition: example_001.php:87

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

◆ getTitleForNodeId()

ilRepositorySelector2InputGUI::getTitleForNodeId (   $a_id)

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

Parameters

return

Reimplemented from ilExplorerSelectInputGUI.

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

92 {
93 $c = $this->getTitleModifier();
94 if (is_callable($c)) {
95 return $c($a_id);
96 }
98 }
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title

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

+ 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:

◆ handleExplorerCommand()

ilRepositorySelector2InputGUI::handleExplorerCommand ( )

Handle explorer command.

Reimplemented from ilExplorerSelectInputGUI.

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

104 {
105 if ($this->explorer_gui->handleCommand()) {
106 // exit;
107 }
108 }

◆ render()

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

Render item.

Reimplemented from ilExplorerSelectInputGUI.

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

137 {
139 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
140 return parent::render($a_mode);
141 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $_REQUEST["postvar"]);
142 }

References ilFormPropertyGUI\$ctrl, and $ilCtrl.

◆ setTitleModifier()

ilRepositorySelector2InputGUI::setTitleModifier ( callable  $a_val)

Set title modifier.

Parameters
callable$a_val

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

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 }

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: