ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilScaleInputGUI Class Reference

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

+ Inheritance diagram for ilScaleInputGUI:
+ Collaboration diagram for ilScaleInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setScaleInlineStyle ($a_value)
 Set scale inline style. More...
 
 getScaleInlineStyle ()
 Get scale inline style. More...
 
 setScaleDisabled ($a_value)
 Set scale disabled. More...
 
 getScaleDisabled ()
 Get scale disabled. More...
 
 setScale ($a_value)
 Set scale. More...
 
 getScale ()
 Get scale. More...
 
- 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...
 
 setMultiValues (array $a_values)
 
 render ($a_mode="")
 Render item. More...
 
 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...
 

Protected Member Functions

 render ($a_mode="")
 Render item. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Private Attributes

 $scale
 
 $scale_disabled
 
 $scale_stylecss
 

Additional Inherited Members

- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Detailed Description

This class represents a scale property in a property form.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 13 of file class.ilScaleInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilScaleInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 25 of file class.ilScaleInputGUI.php.

26  {
27  parent::__construct($a_title, $a_postvar);
28  $this->scale_disabled = true;
29  $this->scale_stylecss = 'text-align: right;';
30  }

Member Function Documentation

◆ getScale()

ilScaleInputGUI::getScale ( )

Get scale.

Returns
double scale

Definition at line 87 of file class.ilScaleInputGUI.php.

References $scale.

Referenced by render().

88  {
89  return $this->scale;
90  }
+ Here is the caller graph for this function:

◆ getScaleDisabled()

ilScaleInputGUI::getScaleDisabled ( )

Get scale disabled.

Returns
boolean Value

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

References $scale_disabled.

Referenced by render().

68  {
69  return $this->scale_disabled;
70  }
+ Here is the caller graph for this function:

◆ getScaleInlineStyle()

ilScaleInputGUI::getScaleInlineStyle ( )

Get scale inline style.

Parameters
stringValue

Definition at line 47 of file class.ilScaleInputGUI.php.

References $scale_stylecss.

Referenced by render().

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

◆ render()

ilScaleInputGUI::render (   $a_mode = "")
protected

Render item.

Definition at line 96 of file class.ilScaleInputGUI.php.

References $tpl, ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilTextInputGUI\getInlineStyle(), ilTextInputGUI\getMaxLength(), ilFormPropertyGUI\getPostVar(), getScale(), getScaleDisabled(), getScaleInlineStyle(), ilTextInputGUI\getSize(), ilTextInputGUI\getSuffix(), ilTextInputGUI\getValue(), and ilUtil\prepareFormOutput().

97  {
98  $tpl = new ilTemplate("tpl.prop.scaleinput.html", true, true, "Modules/SurveyQuestionPool");
99  if (strlen($this->getValue()))
100  {
101  $tpl->setCurrentBlock("prop_text_propval");
102  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
103  $tpl->parseCurrentBlock();
104  }
105  if (strlen($this->getScale()))
106  {
107  $tpl->setCurrentBlock("prop_text_scale");
108  $tpl->setVariable("SCALE_VALUE", ilUtil::prepareFormOutput($this->getScale()));
109  $tpl->parseCurrentBlock();
110  }
111  if (strlen($this->getInlineStyle()))
112  {
113  $tpl->setCurrentBlock("stylecss");
114  $tpl->setVariable("CSS_STYLE", ilUtil::prepareFormOutput($this->getInlineStyle()));
115  $tpl->parseCurrentBlock();
116  }
117  if (strlen($this->getScaleInlineStyle()))
118  {
119  $tpl->setCurrentBlock("scale_stylecss");
120  $tpl->setVariable("CSS_STYLE", ilUtil::prepareFormOutput($this->getScaleInlineStyle()));
121  $tpl->parseCurrentBlock();
122  }
123 
124  $tpl->setVariable("ID", $this->getFieldId());
125  $tpl->setVariable("SIZE", $this->getSize());
126  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
127  if (strlen($this->getSuffix())) $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
128 
129  if ($this->getDisabled())
130  {
131  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
132  }
133  if ($this->getScaleDisabled())
134  {
135  $tpl->setVariable("SCALE_DISABLED", " disabled=\"disabled\"");
136  }
137  $tpl->setVariable("POST_VAR", $this->getPostVar());
138 
139  return $tpl->get();
140  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
getPostVar()
Get Post Variable.
getSuffix()
Get suffix.
getScaleInlineStyle()
Get scale inline style.
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
getInlineStyle()
Get inline style.
getScaleDisabled()
Get scale disabled.
+ Here is the call graph for this function:

◆ setScale()

ilScaleInputGUI::setScale (   $a_value)

Set scale.

Parameters
double$a_valueValue

Definition at line 77 of file class.ilScaleInputGUI.php.

78  {
79  $this->scale = $a_value;
80  }

◆ setScaleDisabled()

ilScaleInputGUI::setScaleDisabled (   $a_value)

Set scale disabled.

Parameters
boolean$a_valueValue

Definition at line 57 of file class.ilScaleInputGUI.php.

58  {
59  $this->scale_disabled = $a_value;
60  }

◆ setScaleInlineStyle()

ilScaleInputGUI::setScaleInlineStyle (   $a_value)

Set scale inline style.

Parameters
string$a_valueValue

Definition at line 37 of file class.ilScaleInputGUI.php.

38  {
39  $this->scale_stylecss = $a_value;
40  }

Field Documentation

◆ $scale

ilScaleInputGUI::$scale
private

Definition at line 15 of file class.ilScaleInputGUI.php.

Referenced by getScale().

◆ $scale_disabled

ilScaleInputGUI::$scale_disabled
private

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

Referenced by getScaleDisabled().

◆ $scale_stylecss

ilScaleInputGUI::$scale_stylecss
private

Definition at line 17 of file class.ilScaleInputGUI.php.

Referenced by getScaleInlineStyle().


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