ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilManualPlaceholderInputGUI Class Reference

Class ilManualPlaceholderInputGUI. More...

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

Public Member Functions

 __construct ($url)
 
 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...
 
 removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Protected Attributes

 $placeholders = array()
 
 $url
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- 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 (   $url)

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

22 {
23 global $tpl;
24
25 parent::__construct('');
26 $this->url = $url;
27 $tpl->addJavaScript('Services/Mail/js/ilMailComposeFunctions.js');
28 }
global $tpl
Definition: ilias.php:8

References $tpl, and $url.

Member Function Documentation

◆ addPlaceholder()

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

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

35 {
36 $this->placeholders[$placeholder]['placeholder'] = $placeholder;
37 $this->placeholders[$placeholder]['title'] = $title;
38 }

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 110 of file class.ilManualPlaceholderInputGUI.php.

111 {
112 return true;
113 }

◆ insert()

ilManualPlaceholderInputGUI::insert (   $a_tpl)
Parameters
$a_tpl

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

44 {
45 $html = $this->render();
46
47 $a_tpl->setCurrentBlock("prop_generic");
48 $a_tpl->setVariable("PROP_GENERIC", $html);
49 $a_tpl->parseCurrentBlock();
50 }
$html
Definition: example_001.php:87

References $html, and render().

+ Here is the call graph for this function:

◆ render()

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

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

57 {
58 global $lng;
59
60 $subtpl = new ilTemplate("tpl.mail_manual_placeholders.html", true, true, "Services/Mail");
61 $subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('mail_nacc_use_placeholder'));
62 $subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', sprintf($lng->txt('placeholders_advise'), '<br />'));
63 if(count($this->placeholders) > 0)
64 {
65 foreach($this->placeholders as $placeholder)
66 {
67 $subtpl->setCurrentBlock('man_placeholder');
68 $subtpl->setVariable('MANUAL_PLACEHOLDER', $placeholder['placeholder']);
69 $subtpl->setVariable('TXT_MANUAL_PLACEHOLDER', $placeholder['title']);
70 $subtpl->parseCurrentBlock();
71 }
72 }
73 if($ajax)
74 {
75 echo $subtpl->get();
76 exit();
77 }
78 else
79 {
80 $subtpl->setVariable('URL', $this->url);
81 return $subtpl->get();
82 }
83
84 }
special template class to simplify handling of ITX/PEAR
exit
Definition: login.php:54
global $lng
Definition: privfeed.php:40

References $lng, and exit.

Referenced by insert().

+ Here is the caller graph for this function:

◆ setValue()

ilManualPlaceholderInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

101 {
102 if($this->getMulti() && is_array($a_value))
103 {
104 $this->setMultiValues($a_value);
105 $a_value = array_shift($a_value);
106 }
107 $this->value = $a_value;
108 }
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 91 of file class.ilManualPlaceholderInputGUI.php.

92 {
93 $this->setValue($a_values[$this->getPostVar()]);
94 }
getPostVar()
Get Post Variable.

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

+ Here is the call graph for this function:

Field Documentation

◆ $placeholders

ilManualPlaceholderInputGUI::$placeholders = array()
protected

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

◆ $url

ilManualPlaceholderInputGUI::$url
protected

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

Referenced by __construct().


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