ILIAS  release_8 Revision v8.24
ilMailQuickFilterInputGUI Class Reference
+ Inheritance diagram for ilMailQuickFilterInputGUI:
+ Collaboration diagram for ilMailQuickFilterInputGUI:

Public Member Functions

 __construct ($a_title, $a_postvar)
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 render (string $a_mode='')
 
- Public Member Functions inherited from ilTextInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setValue ($a_value)
 
 getValue ()
 
 setValidationFailureMessage (string $a_msg)
 
 getValidationFailureMessage ()
 
 setValidationRegexp (string $a_value)
 
 getValidationRegexp ()
 
 setMaxLength (?int $a_maxlength)
 
 getMaxLength ()
 
 setSize (int $a_size)
 
 setInlineStyle (string $a_style)
 
 getInlineStyle ()
 
 setCssClass (string $a_class)
 
 getCssClass ()
 
 setValueByArray (array $a_values)
 
 getSize ()
 
 setSuffix (string $a_value)
 
 getSuffix ()
 
 setInputType (string $a_type)
 set input type More...
 
 getInputType ()
 
 setSubmitFormOnEnter (bool $a_val)
 
 getSubmitFormOnEnter ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 getDataSource ()
 
 setDataSource (string $href, string $a_delimiter=null)
 
 setDataSourceSubmitOnSelection (bool $a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl (string $a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 render (string $a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 setDisableHtmlAutoComplete (bool $autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
 getPostValueForComparison ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. 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...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Protected Attributes

Factory $refinery
 
GlobalHttpState $httpState
 
- Protected Attributes inherited from ilTextInputGUI
 $value = null
 
int $maxlength = 200
 
int $size = 40
 
string $validationRegexp = ""
 
string $validationFailureMessage = ''
 
string $suffix = ""
 
string $style_css = ""
 
string $css_class = ""
 
string $ajax_datasource = ""
 
string $ajax_datasource_delimiter = null
 
bool $ajax_datasource_commit = false
 
string $ajax_datasource_commit_url = ""
 
bool $submit_form_on_enter = false
 
bool $autocomplete_disabled = false
 
string $input_type = ""
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- 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 ilFormPropertyGUI
 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

Constructor & Destructor Documentation

◆ __construct()

ilMailQuickFilterInputGUI::__construct (   $a_title,
  $a_postvar 
)

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

34 {
35 global $DIC;
36
37 $this->refinery = $DIC->refinery();
38 $this->httpState = $DIC->http();
39
40 parent::__construct($a_title, $a_postvar);
41 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilMailQuickFilterInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Reimplemented from ilTextInputGUI.

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

43 : bool
44 {
45 $ok = parent::checkInput();
46
47 $query = '';
48 if ($this->httpState->wrapper()->post()->has($this->getPostVar())) {
49 $query = ilUtil::stripSlashes($this->httpState->wrapper()->post()->retrieve(
50 $this->getPostVar(),
51 $this->refinery->kindlyTo()->string()
52 ));
53 }
54
55 if (!$ok) {
56 return false;
57 }
58
59 try {
61 return true;
62 } catch (Exception $e) {
63 $this->setAlert($this->lng->txt($e->getMessage()));
64 return false;
65 }
66 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$query

References Vendor\Package\$e, $query, ILIAS\Repository\lng(), ilFormPropertyGUI\setAlert(), ilUtil\stripSlashes(), and ilLuceneQueryParser\validateQuery().

+ Here is the call graph for this function:

◆ render()

ilMailQuickFilterInputGUI::render ( string  $a_mode = '')

Reimplemented from ilTextInputGUI.

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

68 : string
69 {
70 $tpl = new ilTemplate(
71 'tpl.prop_mail_quick_filter_input.html',
72 true,
73 true,
74 'Services/Mail'
75 );
76 if ($this->getValue() !== '') {
77 $tpl->setCurrentBlock('prop_text_propval');
78 $tpl->setVariable('PROPERTY_VALUE', ilLegacyFormElementsUtil::prepareFormOutput((string) $this->getValue()));
79 $tpl->parseCurrentBlock();
80 }
81 if ($this->getInlineStyle() !== '') {
82 $tpl->setCurrentBlock('stylecss');
83 $tpl->setVariable('CSS_STYLE', ilLegacyFormElementsUtil::prepareFormOutput($this->getInlineStyle()));
84 $tpl->parseCurrentBlock();
85 }
86 if ($this->getCssClass() !== '') {
87 $tpl->setCurrentBlock('classcss');
88 $tpl->setVariable('CLASS_CSS', ilLegacyFormElementsUtil::prepareFormOutput($this->getCssClass()));
89 $tpl->parseCurrentBlock();
90 }
91 if ($this->getSubmitFormOnEnter()) {
92 $tpl->touchBlock('submit_form_on_enter');
93 }
94
95 switch ($this->getInputType()) {
96 case 'password':
97 $tpl->setVariable('PROP_INPUT_TYPE', 'password');
98 break;
99 case 'hidden':
100 $tpl->setVariable('PROP_INPUT_TYPE', 'hidden');
101 break;
102 case 'text':
103 default:
104 $tpl->setVariable('PROP_INPUT_TYPE', 'text');
105 }
106 $tpl->setVariable('ID', $this->getFieldId());
107 $tpl->setVariable('ARIA_LABEL', $this->getTitle());
108 $tpl->setVariable('SIZE', $this->getSize());
109 if ($this->getMaxLength() !== null) {
110 $tpl->setVariable('MAXLENGTH', $this->getMaxLength());
111 }
112 if ($this->getSuffix() !== '') {
113 $tpl->setVariable('INPUT_SUFFIX', $this->getSuffix());
114 }
115
116 $postvar = $this->getPostVar();
117 if ($this->getMulti() && substr($postvar, -2) !== '[]') {
118 $postvar .= '[]';
119 }
120
121 if ($this->getDisabled()) {
122 if ($this->getMulti()) {
123 $value = $this->getMultiValues();
124 $hidden = '';
125 if (is_array($value)) {
126 foreach ($value as $item) {
127 $hidden .= $this->getHiddenTag($postvar, $item);
128 }
129 }
130 } else {
131 $hidden = $this->getHiddenTag($postvar, $this->getValue());
132 }
133 if ($hidden) {
134 $tpl->setVariable('DISABLED', ' disabled=\'disabled\'');
135 $tpl->setVariable('HIDDEN_INPUT', $hidden);
136 }
137 } else {
138 $tpl->setVariable('POST_VAR', $postvar);
139 }
140
141 if ($a_mode === 'toolbar') {
142 // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
143 // -moz-inline-stack for FF2
144 // zoom 1; *display:inline for IE6 & 7
145 $tpl->setVariable(
146 'STYLE_PAR',
147 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;'
148 );
149 } else {
150 $tpl->setVariable('STYLE_PAR');
151 }
152
153 if ($this->sub_items !== []) {
154 $tpl->setVariable('FIELD_ID', $this->getFieldId());
155 $tpl->setVariable('TXT_PLACEHOLDER', $this->lng->txt('mail_filter_field_placeholder'));
156 $tpl->setVariable('TXT_FILTER_MESSAGES_BY', $this->lng->txt('mail_filter_txt'));
157
158 $subitem_html = '';
159 foreach ($this->sub_items as $item) {
160 $subitem_html .= $item->render('toolbar');
161 }
162
163 $tpl->setVariable('FIELD_SUBITEMS', $subitem_html);
164 }
165
166 return $tpl->get();
167 }
getHiddenTag(string $a_post_var, string $a_value)
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References 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(), ILIAS\Repository\lng(), and ilLegacyFormElementsUtil\prepareFormOutput().

+ Here is the call graph for this function:

Field Documentation

◆ $httpState

GlobalHttpState ilMailQuickFilterInputGUI::$httpState
protected

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

◆ $refinery

Factory ilMailQuickFilterInputGUI::$refinery
protected

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


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