ILIAS  release_7 Revision v7.30-3-g800a261c036
ilManualPlaceholderInputGUI Class Reference

Class ilManualPlaceholderInputGUI. More...

+ Inheritance diagram for ilManualPlaceholderInputGUI:
+ Collaboration diagram for ilManualPlaceholderInputGUI:

Public Member Functions

 __construct ($dependencyElementId)
 ilManualPlaceholderInputGUI constructor. More...
 
 getRerenderUrl ()
 
 getRerenderTriggerElementName ()
 
 supportsRerenderSignal ($elementId, $url)
 
 getAdviseText ()
 
 setAdviseText ($adviseText)
 
 getInstructionText ()
 
 setInstructionText ($instructionText)
 
 addPlaceholder ($placeholder, $title)
 
 insert ($a_tpl)
 
 render ($ajax=false)
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 setValue ($a_value)
 Set Value. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. 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...
 

Protected Attributes

 $placeholders = array()
 
 $rerenderUrl
 
 $rerenderTriggerElementName
 
 $dependencyElementId
 
 $instructionText = ''
 
 $adviseText = ''
 
 $tpl
 
 $lng
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- 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()

ilManualPlaceholderInputGUI::__construct (   $dependencyElementId)

ilManualPlaceholderInputGUI constructor.

Parameters
string$dependencyElementId

Definition at line 56 of file class.ilManualPlaceholderInputGUI.php.

57 {
58 global $DIC;
59
60 $this->tpl = $DIC->ui()->mainTemplate();
61 $this->lng = $DIC->language();
62
64
65 $this->dependencyElementId = $dependencyElementId;
66
67 $this->tpl->addJavaScript('Services/Mail/js/ilMailComposeFunctions.js');
68 }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $dependencyElementId, $DIC, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ addPlaceholder()

ilManualPlaceholderInputGUI::addPlaceholder (   $placeholder,
  $title 
)
Parameters
string$placeholder
string$title

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

133 {
134 $this->placeholders[$placeholder]['placeholder'] = $placeholder;
135 $this->placeholders[$placeholder]['title'] = $title;
136 }

References ilFormPropertyGUI\$title.

◆ checkInput()

ilManualPlaceholderInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 213 of file class.ilManualPlaceholderInputGUI.php.

214 {
215 return true;
216 }

◆ getAdviseText()

ilManualPlaceholderInputGUI::getAdviseText ( )
Returns
string

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

References $adviseText.

Referenced by render().

+ Here is the caller graph for this function:

◆ getInstructionText()

ilManualPlaceholderInputGUI::getInstructionText ( )
Returns
string

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

References $instructionText.

◆ getRerenderTriggerElementName()

ilManualPlaceholderInputGUI::getRerenderTriggerElementName ( )
Returns
string

Definition at line 81 of file class.ilManualPlaceholderInputGUI.php.

References $rerenderTriggerElementName.

Referenced by render().

+ Here is the caller graph for this function:

◆ getRerenderUrl()

ilManualPlaceholderInputGUI::getRerenderUrl ( )
Returns
string

Definition at line 73 of file class.ilManualPlaceholderInputGUI.php.

References $rerenderUrl.

Referenced by render().

+ Here is the caller graph for this function:

◆ insert()

ilManualPlaceholderInputGUI::insert (   $a_tpl)
Parameters
$a_tpl

Definition at line 141 of file class.ilManualPlaceholderInputGUI.php.

142 {
143 $html = $this->render();
144
145 $a_tpl->setCurrentBlock("prop_generic");
146 $a_tpl->setVariable("PROP_GENERIC", $html);
147 $a_tpl->parseCurrentBlock();
148 }

References render().

+ Here is the call graph for this function:

◆ render()

ilManualPlaceholderInputGUI::render (   $ajax = false)
Parameters
bool$ajax
Returns
string|void

Definition at line 154 of file class.ilManualPlaceholderInputGUI.php.

155 {
156 $subtpl = new ilTemplate("tpl.mail_manual_placeholders.html", true, true, "Services/Mail");
157 $subtpl->setVariable('TXT_USE_PLACEHOLDERS', $this->lng->txt('mail_nacc_use_placeholder'));
158 $subtpl->setVariable('DEPENDENCY_ELM_ID_OUTER', $this->dependencyElementId);
159 if ($this->getAdviseText()) {
160 $subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', $this->getAdviseText());
161 }
162
163 if (count($this->placeholders) > 0) {
164 foreach ($this->placeholders as $placeholder) {
165 $subtpl->setCurrentBlock('man_placeholder');
166 $subtpl->setVariable('DEPENDENCY_ELM_ID', $this->dependencyElementId);
167 $subtpl->setVariable('PLACEHOLDER', '[' . $placeholder['placeholder'] . ']');
168 $subtpl->setVariable('PLACEHOLDER_INTERACTION_INFO', sprintf(
169 $this->lng->txt('mail_hint_add_placeholder_x'),
170 '[' . $placeholder['placeholder'] . ']'
171 ));
172 $subtpl->setVariable('PLACEHOLDER_DESCRIPTION', $placeholder['title']);
173 $subtpl->parseCurrentBlock();
174 }
175 }
176
177 if ($this->getRerenderTriggerElementName() && $this->getRerenderUrl()) {
178 $subtpl->setVariable('RERENDER_URL', $this->getRerenderUrl());
179 $subtpl->setVariable('RERENDER_TRIGGER_ELM_NAME', $this->getRerenderTriggerElementName());
180 }
181
182 if ($ajax) {
183 echo $subtpl->get();
184 exit();
185 }
186
187 return $subtpl->get();
188 }
special template class to simplify handling of ITX/PEAR
exit
Definition: login.php:29

References exit, getAdviseText(), getRerenderTriggerElementName(), and getRerenderUrl().

Referenced by insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAdviseText()

ilManualPlaceholderInputGUI::setAdviseText (   $adviseText)
Parameters
string$adviseText

Definition at line 107 of file class.ilManualPlaceholderInputGUI.php.

108 {
109 $this->adviseText = $adviseText;
110 }

References $adviseText.

◆ setInstructionText()

ilManualPlaceholderInputGUI::setInstructionText (   $instructionText)
Parameters
string$instructionText

Definition at line 123 of file class.ilManualPlaceholderInputGUI.php.

124 {
125 $this->instructionText = $instructionText;
126 }

References $instructionText.

◆ setValue()

ilManualPlaceholderInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 204 of file class.ilManualPlaceholderInputGUI.php.

205 {
206 if ($this->getMulti() && is_array($a_value)) {
207 $this->setMultiValues($a_value);
208 $a_value = array_shift($a_value);
209 }
210 $this->value = $a_value;
211 }
setMultiValues(array $a_values)
Set multi values.

References ilFormPropertyGUI\getMulti(), and ilFormPropertyGUI\setMultiValues().

Referenced by setValueByArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValueByArray()

ilManualPlaceholderInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 195 of file class.ilManualPlaceholderInputGUI.php.

196 {
197 $this->setValue($a_values[$this->getPostVar()]);
198 }
getPostVar()
Get Post Variable.

References ilFormPropertyGUI\getPostVar(), and setValue().

+ Here is the call graph for this function:

◆ supportsRerenderSignal()

ilManualPlaceholderInputGUI::supportsRerenderSignal (   $elementId,
  $url 
)
Parameters
string$elementId
string$url

Definition at line 90 of file class.ilManualPlaceholderInputGUI.php.

91 {
92 $this->rerenderTriggerElementName = $elementId;
93 $this->rerenderUrl = $url;
94 }
$url

References $url.

Field Documentation

◆ $adviseText

ilManualPlaceholderInputGUI::$adviseText = ''
protected

Definition at line 40 of file class.ilManualPlaceholderInputGUI.php.

Referenced by getAdviseText(), and setAdviseText().

◆ $dependencyElementId

ilManualPlaceholderInputGUI::$dependencyElementId
protected

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

Referenced by __construct().

◆ $instructionText

ilManualPlaceholderInputGUI::$instructionText = ''
protected

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

Referenced by getInstructionText(), and setInstructionText().

◆ $lng

ilManualPlaceholderInputGUI::$lng
protected

Definition at line 50 of file class.ilManualPlaceholderInputGUI.php.

◆ $placeholders

ilManualPlaceholderInputGUI::$placeholders = array()
protected

Definition at line 15 of file class.ilManualPlaceholderInputGUI.php.

◆ $rerenderTriggerElementName

ilManualPlaceholderInputGUI::$rerenderTriggerElementName
protected

Definition at line 25 of file class.ilManualPlaceholderInputGUI.php.

Referenced by getRerenderTriggerElementName().

◆ $rerenderUrl

ilManualPlaceholderInputGUI::$rerenderUrl
protected

Definition at line 20 of file class.ilManualPlaceholderInputGUI.php.

Referenced by getRerenderUrl().

◆ $tpl

ilManualPlaceholderInputGUI::$tpl
protected

Definition at line 45 of file class.ilManualPlaceholderInputGUI.php.


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