ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilRepositorySelector2InputGUI Class Reference

Select repository nodes. 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
ilGlobalTemplateInterface $global_template
 
UIServices $ui
 
 $value
 
bool $multi_nodes
 
ilExplorerBaseGUI $explorer_gui
 
bool $disabled = false
 
 $on_load_code
 The on load code sould only be added once, otherwise the select link opens two modals and stuff breaks (https://mantis.ilias.de/view.php?id=42821). More...
 
- 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 ilExplorerSelectInputGUI
 getInitializationOnLoadCode ()
 
- Protected Member Functions inherited from ilFormPropertyGUI
 symbol ()
 
 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

Select repository nodes.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_IsCalledBy ilRepositorySelector2InputGUI: ilFormPropertyDispatchGUI
Deprecated:
12 This component will be removed with ILIAS 12

Definition at line 28 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 36 of file class.ilRepositorySelector2InputGUI.php.

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

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 107 of file class.ilRepositorySelector2InputGUI.php.

107 : string
108 {
109 $ilCtrl = $this->ctrl;
110 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->postvar);
111 $html = parent::render();
112 $ilCtrl->setParameterByClass("ilformpropertydispatchgui", "postvar", $this->str("postvar"));
113 return $html;
114 }
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 100 of file class.ilRepositorySelector2InputGUI.php.

100 : array
101 {
102 return [
104 ];
105 }

References ilExplorerSelectInputGUI\getInitializationOnLoadCode().

+ 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 81 of file class.ilRepositorySelector2InputGUI.php.

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

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

+ Here is the call graph for this function:

◆ getTitleModifier()

ilRepositorySelector2InputGUI::getTitleModifier ( )

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

76 : ?Closure
77 {
79 }

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 116 of file class.ilRepositorySelector2InputGUI.php.

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

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

+ Here is the call graph for this function:

◆ setExplorerGUI()

ilRepositorySelector2InputGUI::setExplorerGUI ( \ilRepositorySelectorExplorerGUI  $explorer)

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

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

◆ setTitleModifier()

ilRepositorySelector2InputGUI::setTitleModifier ( ?Closure  $a_val)

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

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

Field Documentation

◆ $title_modifier

Closure ilRepositorySelector2InputGUI::$title_modifier = null
protected

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

Referenced by getTitleModifier().


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