44                parent::__construct($a_title, $a_postvar);
 
   45                $this->
setType(
"style_numeric");
 
   56                $this->value = $a_value;
 
   76                $this->allowpercentage = $a_allowpercentage;
 
  103                if ($this->
getRequired() && trim($num_value) == 
"")
 
  105                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  110                if (!is_numeric($num_value) && $num_value != 
"")
 
  112                        $this->
setAlert($lng->txt(
"sty_msg_input_must_be_numeric"));
 
  117                if (trim($num_value) != 
"")
 
  119                        $this->
setValue($num_value.$num_unit);
 
  130                $tpl = 
new ilTemplate(
"tpl.prop_style_numeric.html", 
true, 
true, 
"Services/Style/Content");
 
  139                foreach ($unit_options as $u)
 
  146                $tpl->setVariable(
"VAL_NUM",
 
  147                        substr(
$value, 0, strlen(
$value) - strlen($current_unit)));
 
  148                if ($current_unit == 
"")
 
  150                        $current_unit = 
"px";
 
  153                foreach ($unit_options as $option)
 
  155                        $tpl->setCurrentBlock(
"unit_option");
 
  156                        $tpl->setVariable(
"VAL_UNIT", $option);
 
  157                        $tpl->setVariable(
"TXT_UNIT", $option);
 
  158                        if ($current_unit == $option)
 
  160                                $tpl->setVariable(
"UNIT_SELECTED", 
'selected="selected"');
 
  162                        $tpl->parseCurrentBlock();
 
  165                $a_tpl->setCurrentBlock(
"prop_generic");
 
  166                $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  167                $a_tpl->parseCurrentBlock();
 
An exception for terminatinating execution or to throw for unit testing.
static _getStyleParameterNumericUnits($a_no_percentage=false)
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled