ILIAS  release_8 Revision v8.24
ilRepositorySelector2InputGUI 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 ilRepositorySelector2InputGUI:
+ Collaboration diagram for ilRepositorySelector2InputGUI:

Public Member Functions

 __construct (string $a_title, string $a_postvar, bool $a_multi=false, ?object $forwarder=null)
 
 setTitleModifier (?Closure $a_val)
 
 getTitleModifier ()
 
 getTitleForNodeId ($a_id)
 Get title for node id (needs to be overwritten, if explorer is not a tree eplorer. More...
 
 getExplorerGUI ()
 
 setExplorerGUI (\ilRepositorySelectorExplorerGUI $explorer)
 
 getOnloadCode ()
 
 getHTML ()
 
 render (string $a_mode="property_form")
 Render item. More...
 
- Public Member Functions inherited from ilExplorerSelectInputGUI
 __construct (string $a_title, string $a_postvar, ilExplorerBaseGUI $a_explorer_gui, bool $a_multi=false)
 
 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)
 
 getValue ()
 
 setValueByArray (array $a_values)
 Set value by array. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 render (string $a_mode="property_form")
 Render item. More...
 
 insert (ilTemplate $a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $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...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Protected Attributes

Closure $title_modifier = null
 
- Protected Attributes inherited from ilExplorerSelectInputGUI
 $value
 
bool $multi_nodes
 
ilExplorerBaseGUI $explorer_gui
 
bool $disabled = false
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

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 Select repository nodes

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_IsCalledBy ilRepositorySelector2InputGUI: ilFormPropertyDispatchGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilRepositorySelector2InputGUI::__construct ( string  $a_title,
string  $a_postvar,
bool  $a_multi = false,
?object  $forwarder = null 
)
Parameters
object | null$forwarderobject that forwards to ilFormPropertyDispatchGUI, usually a form object but might be a table as well, e.g. if inputs are used in filter

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

40 {
41 global $DIC;
42
43 $this->ctrl = $DIC->ctrl();
44 $this->multi_nodes = $a_multi;
45 $this->postvar = $a_postvar;
46 $forwarder_class = (is_null($forwarder))
47 ? ilPropertyFormGUI::class
48 : get_class($forwarder);
49 $this->explorer_gui = new ilRepositorySelectorExplorerGUI(
50 [$forwarder_class, ilFormPropertyDispatchGUI::class, ilRepositorySelector2InputGUI::class],
51 $this->getExplHandleCmd(),
52 $this,
53 "selectRepositoryItem",
54 "root_id",
55 "rep_exp_sel_" . $a_postvar
56 );
57 $this->explorer_gui->setSelectMode($a_postvar . "_sel", $this->multi_nodes);
58
59 parent::__construct($a_title, $a_postvar, $this->explorer_gui, $this->multi_nodes);
60 $this->setType("rep_select");
61 }
getExplHandleCmd()
Get explorer handle command function.
Explorer for selecting repository items.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilExplorerSelectInputGUI\getExplHandleCmd(), and ilFormPropertyGUI\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ getExplorerGUI()

ilRepositorySelector2InputGUI::getExplorerGUI ( )

◆ getHTML()

ilRepositorySelector2InputGUI::getHTML ( )

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

106 : string
107 {
108 $ilCtrl = $this->ctrl;
109 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
110 $html = parent::render();
111 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->str("postvar"));
112 return $html;
113 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

References ilFormPropertyGUI\$ctrl, ilCtrl\setParameterByClass(), and ilFormPropertyGUI\str().

+ Here is the call graph for this function:

◆ getOnloadCode()

ilRepositorySelector2InputGUI::getOnloadCode ( )

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

99 : array
100 {
101 return [
102 "il.Explorer2.initSelect('" . $this->getFieldId() . "');"
103 ];
104 }

References ilFormPropertyGUI\getFieldId().

+ Here is the call graph for this function:

◆ getTitleForNodeId()

ilRepositorySelector2InputGUI::getTitleForNodeId (   $a_id)

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

Reimplemented from ilExplorerSelectInputGUI.

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

80 : string
81 {
82 $c = $this->getTitleModifier();
83 if (is_callable($c)) {
84 return $c($a_id);
85 }
87 }
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
$c
Definition: cli.php:38

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

+ Here is the call graph for this function:

◆ getTitleModifier()

ilRepositorySelector2InputGUI::getTitleModifier ( )

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

75 : ?Closure
76 {
78 }

References $title_modifier.

Referenced by getTitleForNodeId().

+ Here is the caller graph for this function:

◆ render()

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

Render item.

Reimplemented from ilExplorerSelectInputGUI.

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

115 : string
116 {
117 $ilCtrl = $this->ctrl;
118 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
119 $ret = parent::render($a_mode);
120 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->str("postvar"));
121 return $ret;
122 }

References ilFormPropertyGUI\$ctrl, ilCtrl\setParameterByClass(), and ilFormPropertyGUI\str().

+ Here is the call graph for this function:

◆ setExplorerGUI()

ilRepositorySelector2InputGUI::setExplorerGUI ( \ilRepositorySelectorExplorerGUI  $explorer)

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

94 : void
95 {
96 $this->explorer_gui = $explorer;
97 }

◆ setTitleModifier()

ilRepositorySelector2InputGUI::setTitleModifier ( ?Closure  $a_val)

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

63 : void
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

Closure ilRepositorySelector2InputGUI::$title_modifier = null
protected

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

Referenced by getTitleModifier().


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