ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilCustomInputGUI Class Reference

This class represents a custom property in a property form. More...

+ Inheritance diagram for ilCustomInputGUI:
+ Collaboration diagram for ilCustomInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 
 setHtml (string $a_html)
 
 getHtml ()
 
 setValueByArray (array $a_values)
 
 insert (ilTemplate $a_tpl)
 
 setSkipRequiredCheck (bool $skip)
 
 checkInput ()
 
 getInput ()
 
- 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)
 
- 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...
 

Protected Attributes

bool $skip_required_check = false
 
string $html = ""
 
- 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
 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 custom property in a property form.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:

Deprecated since 4.4, inherit directly from InputGUI instead

12 This component will be removed with ILIAS 12

Definition at line 28 of file class.ilCustomInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

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

36  {
37  global $DIC;
38  $this->lng = $DIC->language();
39  parent::__construct($a_title, $a_postvar);
40  $this->setType("custom");
41  }
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilCustomInputGUI::checkInput ( )

Definition at line 72 of file class.ilCustomInputGUI.php.

References ilFormPropertyGUI\$lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), getInput(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), and ilLanguage\txt().

72  : bool
73  {
74  $lng = $this->lng;
75 
76  if ($this->getPostVar()) {
77  if (!$this->skip_required_check && $this->getRequired() && $this->getInput() == "") {
78  $this->setAlert($lng->txt("msg_input_is_required"));
79  return false;
80  }
81  }
82  return $this->checkSubItemsInput();
83  }
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...
+ Here is the call graph for this function:

◆ getHtml()

ilCustomInputGUI::getHtml ( )

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

References $html.

Referenced by insert().

48  : string
49  {
50  return $this->html;
51  }
+ Here is the caller graph for this function:

◆ getInput()

ilCustomInputGUI::getInput ( )

Definition at line 85 of file class.ilCustomInputGUI.php.

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

Referenced by checkInput().

85  : string
86  {
87  return trim($this->str($this->getPostVar()));
88  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

ilCustomInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 60 of file class.ilCustomInputGUI.php.

References getHtml(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

60  : void
61  {
62  $a_tpl->setCurrentBlock("prop_custom");
63  $a_tpl->setVariable("CUSTOM_CONTENT", $this->getHtml());
64  $a_tpl->parseCurrentBlock();
65  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ setHtml()

ilCustomInputGUI::setHtml ( string  $a_html)

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

References ILIAS\Repository\html().

Referenced by ilMemberAgreementGUI\addExportFieldInfo(), ilMailFolderGUI\confirmDeleteMails(), ilRegistrationGUI\fillMembershipLimitation(), ilCourseObjectivesGUI\initFormLimits(), and assQuestionGUI\suggestedsolution().

43  : void
44  {
45  $this->html = $a_html;
46  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSkipRequiredCheck()

ilCustomInputGUI::setSkipRequiredCheck ( bool  $skip)

Definition at line 67 of file class.ilCustomInputGUI.php.

67  : void
68  {
69  $this->skip_required_check = $skip;
70  }

◆ setValueByArray()

ilCustomInputGUI::setValueByArray ( array  $a_values)

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

References ilSubEnabledFormPropertyGUI\getSubItems().

53  : void
54  {
55  foreach ($this->getSubItems() as $item) {
56  $item->setValueByArray($a_values);
57  }
58  }
+ Here is the call graph for this function:

Field Documentation

◆ $html

string ilCustomInputGUI::$html = ""
protected

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

Referenced by getHtml().

◆ $skip_required_check

bool ilCustomInputGUI::$skip_required_check = false
protected

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


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