ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMailQuickFilterInputGUI Class Reference
+ Inheritance diagram for ilMailQuickFilterInputGUI:
+ Collaboration diagram for ilMailQuickFilterInputGUI:

Public Member Functions

 checkInput ()
 
 render ($a_mode="")
 
- Public Member Functions inherited from ilTextInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValidationFailureMessage ($a_msg)
 Set message string for validation failure. More...
 
 getValidationFailureMessage ()
 
 setValidationRegexp ($a_value)
 Set validation regexp. More...
 
 getValidationRegexp ()
 Get validation regexp. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setInlineStyle ($a_style)
 Set inline style. More...
 
 getInlineStyle ()
 Get inline style. More...
 
 setCssClass ($a_class)
 
 getCssClass ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setInputType ($a_type)
 set input type More...
 
 getInputType ()
 get input type More...
 
 setSubmitFormOnEnter ($a_val)
 Set submit form on enter. More...
 
 getSubmitFormOnEnter ()
 Get submit form on enter. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getDataSource ()
 get datasource link for js autocomplete More...
 
 setDataSource ($href, $a_delimiter=null)
 set datasource link for js autocomplete More...
 
 setDataSourceSubmitOnSelection ($a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl ($a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 insert ($a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 setDisableHtmlAutoComplete ($autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
- 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...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

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...
 
- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $ajax_datasource_commit = false
 
 $ajax_datasource_commit_url
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- 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
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 11 of file class.ilMailQuickFilterInputGUI.php.

Member Function Documentation

◆ checkInput()

ilMailQuickFilterInputGUI::checkInput ( )
Returns
bool

Definition at line 16 of file class.ilMailQuickFilterInputGUI.php.

References $_POST, $DIC, $ok, $query, ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\setAlert(), ilUtil\stripSlashes(), and ilLuceneQueryParser\validateQuery().

17  {
18  global $DIC;
19 
20  $ok = parent::checkInput();
21 
23 
24  if (!$ok) {
25  return false;
26  }
27 
28  include_once 'Services/Mail/classes/class.ilMailLuceneQueryParser.php';
29  try {
31  return true;
32  } catch (Exception $e) {
33  $this->setAlert($DIC->language()->txt($e->getMessage()));
34  return false;
35  }
36  }
global $DIC
Definition: saml.php:7
getPostVar()
Get Post Variable.
setAlert($a_alert)
Set Alert Text.
$query
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ render()

ilMailQuickFilterInputGUI::render (   $a_mode = "")

Definition at line 38 of file class.ilMailQuickFilterInputGUI.php.

References $DIC, ilFormPropertyGUI\$postvar, $tpl, ilTextInputGUI\$value, ilTextInputGUI\getCssClass(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), ilTextInputGUI\getInlineStyle(), ilTextInputGUI\getInputType(), ilTextInputGUI\getMaxLength(), ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getMultiValues(), ilFormPropertyGUI\getPostVar(), ilTextInputGUI\getSize(), ilTextInputGUI\getSubmitFormOnEnter(), ilTextInputGUI\getSuffix(), ilFormPropertyGUI\getTitle(), ilTextInputGUI\getValue(), and ilUtil\prepareFormOutput().

39  {
40  global $DIC;
41 
42  $tpl = new ilTemplate("tpl.prop_mail_quick_filter_input.html", true, true, "Services/Mail");
43  if (strlen($this->getValue())) {
44  $tpl->setCurrentBlock("prop_text_propval");
45  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
46  $tpl->parseCurrentBlock();
47  }
48  if (strlen($this->getInlineStyle())) {
49  $tpl->setCurrentBlock("stylecss");
50  $tpl->setVariable("CSS_STYLE", ilUtil::prepareFormOutput($this->getInlineStyle()));
51  $tpl->parseCurrentBlock();
52  }
53  if (strlen($this->getCssClass())) {
54  $tpl->setCurrentBlock("classcss");
55  $tpl->setVariable('CLASS_CSS', ilUtil::prepareFormOutput($this->getCssClass()));
56  $tpl->parseCurrentBlock();
57  }
58  if ($this->getSubmitFormOnEnter()) {
59  $tpl->touchBlock("submit_form_on_enter");
60  }
61 
62  switch ($this->getInputType()) {
63  case 'password':
64  $tpl->setVariable('PROP_INPUT_TYPE', 'password');
65  break;
66  case 'hidden':
67  $tpl->setVariable('PROP_INPUT_TYPE', 'hidden');
68  break;
69  case 'text':
70  default:
71  $tpl->setVariable('PROP_INPUT_TYPE', 'text');
72  }
73  $tpl->setVariable("ID", $this->getFieldId());
74  $tpl->setVariable("ARIA_LABEL", $this->getTitle());
75  $tpl->setVariable("SIZE", $this->getSize());
76  if ($this->getMaxLength() != null) {
77  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
78  }
79  if (strlen($this->getSuffix())) {
80  $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
81  }
82 
83  $postvar = $this->getPostVar();
84  if ($this->getMulti() && substr($postvar, -2) != "[]") {
85  $postvar .= "[]";
86  }
87 
88  if ($this->getDisabled()) {
89  if ($this->getMulti()) {
90  $value = $this->getMultiValues();
91  $hidden = "";
92  if (is_array($value)) {
93  foreach ($value as $item) {
94  $hidden .= $this->getHiddenTag($postvar, $item);
95  }
96  }
97  } else {
98  $hidden = $this->getHiddenTag($postvar, $this->getValue());
99  }
100  if ($hidden) {
101  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
102  $tpl->setVariable("HIDDEN_INPUT", $hidden);
103  }
104  } else {
105  $tpl->setVariable("POST_VAR", $postvar);
106  }
107 
108  if ($a_mode == "toolbar") {
109  // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
110  // -moz-inline-stack for FF2
111  // zoom 1; *display:inline for IE6 & 7
112  $tpl->setVariable("STYLE_PAR", 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
113  } else {
114  $tpl->setVariable("STYLE_PAR", '');
115  }
116 
117  if (is_array($this->sub_items) && $this->sub_items) {
118  $tpl->setVariable("FIELD_ID", $this->getFieldId());
119  $tpl->setVariable("TXT_PLACEHOLDER", $DIC->language()->txt('mail_filter_field_placeholder'));
120  $tpl->setVariable("TXT_FILTER_MESSAGES_BY", $DIC->language()->txt('mail_filter_txt'));
121 
122  $subitem_html = '';
123  foreach ($this->sub_items as $item) {
124  $subitem_html .= $item->render('toolbar');
125  }
126 
127  $tpl->setVariable('FIELD_SUBITEMS', $subitem_html);
128  }
129 
130  return $tpl->get();
131  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
getHiddenTag($a_post_var, $a_value)
Get hidden tag (used for disabled properties)
global $DIC
Definition: saml.php:7
$tpl
Definition: ilias.php:10
getPostVar()
Get Post Variable.
getSuffix()
Get suffix.
getMultiValues()
Get multi values.
getSubmitFormOnEnter()
Get submit form on enter.
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
getInputType()
get input type
getInlineStyle()
Get inline style.
+ Here is the call graph for this function:

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