ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
- 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.

References $dependencyElementId, and $DIC.

57  {
58  global $DIC;
59 
60  $this->tpl = $DIC->ui()->mainTemplate();
61  $this->lng = $DIC->language();
62 
63  parent::__construct('');
64 
65  $this->dependencyElementId = $dependencyElementId;
66 
67  $this->tpl->addJavaScript('Services/Mail/js/ilMailComposeFunctions.js');
68  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ addPlaceholder()

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

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

References ilFormPropertyGUI\$title.

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

◆ checkInput()

ilManualPlaceholderInputGUI::checkInput ( )

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

209  {
210  return true;
211  }

◆ 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.

References $html, and render().

142  {
143  $html = $this->render();
144 
145  $a_tpl->setCurrentBlock("prop_generic");
146  $a_tpl->setVariable("PROP_GENERIC", $html);
147  $a_tpl->parseCurrentBlock();
148  }
$html
Definition: example_001.php:87
+ 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.

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

Referenced by insert().

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  if ($this->getAdviseText()) {
159  $subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', $this->getAdviseText());
160  }
161 
162  if (count($this->placeholders) > 0) {
163  foreach ($this->placeholders as $placeholder) {
164  $subtpl->setCurrentBlock('man_placeholder');
165  $subtpl->setVariable('DEPENDENCY_ELM_ID', $this->dependencyElementId);
166  $subtpl->setVariable('MANUAL_PLACEHOLDER', $placeholder['placeholder']);
167  $subtpl->setVariable('TXT_MANUAL_PLACEHOLDER', $placeholder['title']);
168  $subtpl->parseCurrentBlock();
169  }
170  }
171 
172  if ($this->getRerenderTriggerElementName() && $this->getRerenderUrl()) {
173  $subtpl->setVariable('RERENDER_URL', $this->getRerenderUrl());
174  $subtpl->setVariable('RERENDER_TRIGGER_ELM_NAME', $this->getRerenderTriggerElementName());
175  }
176 
177  if ($ajax) {
178  echo $subtpl->get();
179  exit();
180  }
181 
182  return $subtpl->get();
183  }
special template class to simplify handling of ITX/PEAR
exit
Definition: backend.php:16
+ 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.

References $adviseText.

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

◆ setInstructionText()

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

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

References $instructionText.

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

◆ setValue()

ilManualPlaceholderInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

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

Referenced by setValueByArray().

200  {
201  if ($this->getMulti() && is_array($a_value)) {
202  $this->setMultiValues($a_value);
203  $a_value = array_shift($a_value);
204  }
205  $this->value = $a_value;
206  }
setMultiValues(array $a_values)
Set multi values.
+ 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 190 of file class.ilManualPlaceholderInputGUI.php.

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

191  {
192  $this->setValue($a_values[$this->getPostVar()]);
193  }
getPostVar()
Get Post Variable.
+ 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.

References $url.

91  {
92  $this->rerenderTriggerElementName = $elementId;
93  $this->rerenderUrl = $url;
94  }
$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: