ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilRegExpInputGUI Class Reference

This class represents a regular expression input property in a property form. More...

+ Inheritance diagram for ilRegExpInputGUI:
+ Collaboration diagram for ilRegExpInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 
 setNoMatchMessage (string $a_nomatchmessage)
 
 getNoMatchMessage ()
 
 setPattern (string $pattern)
 
 getPattern ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
- 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

string $nomatchmessage = ""
 
- 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
 

Private Attributes

string $pattern = ""
 

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
 symbol ()
 
 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

This class represents a regular expression input property in a property form.

Author
Roland Küstermann rolan.nosp@m.d.ku.nosp@m.ester.nosp@m.mann.nosp@m.@kit..nosp@m.edu
Deprecated:
12 This component will be removed with ILIAS 12

Definition at line 27 of file class.ilRegExpInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilRegExpInputGUI::__construct ( string  $a_title = "",
string  $a_postvar = "" 
)

Reimplemented from ilTextInputGUI.

Definition at line 32 of file class.ilRegExpInputGUI.php.

35 {
36 global $DIC;
37
38 $this->lng = $DIC->language();
39 parent::__construct($a_title, $a_postvar);
40 $this->setType("feedurl");
41 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilRegExpInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Reimplemented from ilTextInputGUI.

Definition at line 63 of file class.ilRegExpInputGUI.php.

63 : bool
64 {
66
67 $value = $this->getInput();
68
69 if (!$this->getRequired() && strcasecmp($value, "") == 0) {
70 return true;
71 }
72
73 if ($this->getRequired() && trim($value) == "") {
74 $this->setAlert($lng->txt("msg_input_is_required"));
75 return false;
76 }
77
78 $result = (bool) preg_match($this->pattern, $value);
79 if (!$result) {
80 if ($this->getNoMatchMessage() == "") {
81 $this->setAlert($lng->txt("msg_input_does_not_match_regexp"));
82 } else {
83 $this->setAlert($this->getNoMatchMessage());
84 }
85 }
86 return $result;
87 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References ilFormPropertyGUI\$lng, ilTextInputGUI\$value, getInput(), getNoMatchMessage(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getInput()

ilRegExpInputGUI::getInput ( )
Returns
string|string[]

Reimplemented from ilTextInputGUI.

Definition at line 89 of file class.ilRegExpInputGUI.php.

89 : string
90 {
91 return $this->str($this->getPostVar());
92 }

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

Referenced by checkInput().

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

◆ getNoMatchMessage()

ilRegExpInputGUI::getNoMatchMessage ( )

Definition at line 48 of file class.ilRegExpInputGUI.php.

48 : string
49 {
51 }

References $nomatchmessage.

Referenced by checkInput().

+ Here is the caller graph for this function:

◆ getPattern()

ilRegExpInputGUI::getPattern ( )

Definition at line 58 of file class.ilRegExpInputGUI.php.

58 : string
59 {
60 return $this->pattern;
61 }

References $pattern.

◆ setNoMatchMessage()

ilRegExpInputGUI::setNoMatchMessage ( string  $a_nomatchmessage)

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

43 : void
44 {
45 $this->nomatchmessage = $a_nomatchmessage;
46 }

◆ setPattern()

ilRegExpInputGUI::setPattern ( string  $pattern)

Definition at line 53 of file class.ilRegExpInputGUI.php.

53 : void
54 {
55 $this->pattern = $pattern;
56 }

References $pattern.

Field Documentation

◆ $nomatchmessage

string ilRegExpInputGUI::$nomatchmessage = ""
protected

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

Referenced by getNoMatchMessage().

◆ $pattern

string ilRegExpInputGUI::$pattern = ""
private

Definition at line 29 of file class.ilRegExpInputGUI.php.

Referenced by getPattern(), and setPattern().


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