ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

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

Member Function Documentation

◆ checkInput()

ilCustomInputGUI::checkInput ( )

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

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

71  : bool
72  {
73  $lng = $this->lng;
74 
75  if ($this->getPostVar()) {
76  if (!$this->skip_required_check && $this->getRequired() && $this->getInput() == "") {
77  $this->setAlert($lng->txt("msg_input_is_required"));
78  return false;
79  }
80  }
81  return $this->checkSubItemsInput();
82  }
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 47 of file class.ilCustomInputGUI.php.

References $html.

Referenced by insert().

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

◆ getInput()

ilCustomInputGUI::getInput ( )

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

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

Referenced by checkInput().

84  : string
85  {
86  return trim($this->str($this->getPostVar()));
87  }
+ 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 59 of file class.ilCustomInputGUI.php.

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

59  : void
60  {
61  $a_tpl->setCurrentBlock("prop_custom");
62  $a_tpl->setVariable("CUSTOM_CONTENT", $this->getHtml());
63  $a_tpl->parseCurrentBlock();
64  }
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 42 of file class.ilCustomInputGUI.php.

References ILIAS\Repository\html().

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

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

◆ setSkipRequiredCheck()

ilCustomInputGUI::setSkipRequiredCheck ( bool  $skip)

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

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

◆ setValueByArray()

ilCustomInputGUI::setValueByArray ( array  $a_values)

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

References ilSubEnabledFormPropertyGUI\getSubItems().

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

Field Documentation

◆ $html

string ilCustomInputGUI::$html = ""
protected

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

Referenced by getHtml().

◆ $skip_required_check

bool ilCustomInputGUI::$skip_required_check = false
protected

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


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