3 declare(strict_types=1);
    40     public function __construct(
string $a_title = 
"", 
string $a_postvar = 
"")
    44         $this->
lng = $DIC->language();
    45         $this->
user = $DIC->user();
    48         $this->dirs = array(
"all", 
"top", 
"bottom", 
"left", 
"right");
    53         $this->allvalue = $a_allvalue;
    63         $this->topvalue = $a_topvalue;
    73         $this->bottomvalue = $a_bottomvalue;
    83         $this->leftvalue = $a_leftvalue;
    93         $this->rightvalue = $a_rightvalue;
   107         foreach ($this->dirs as $dir) {
   108             $type = $input[$dir][
"type"];
   109             $num_value = $input[$dir][
"num_value"];
   110             $num_unit = $input[$dir][
"num_unit"];
   111             $pre_value = $input[$dir][
"pre_value"];
   121             if (!is_numeric($num_value) && $num_value != 
"") {
   127             if (
$type == 
"numeric") {
   128                 if ($num_value != 
"") {
   129                     $value = $num_value . $num_unit;
   135             if (trim($value) != 
"") {
   164         $layout_tpl = 
new ilTemplate(
"tpl.prop_trbl_layout.html", 
true, 
true, 
"components/ILIAS/Style/Content");
   166         foreach ($this->dirs as $dir) {
   167             $tpl = 
new ilTemplate(
"tpl.prop_trbl_border_width.html", 
true, 
true, 
"components/ILIAS/Style/Content");
   172                 case "all": $value = strtolower(trim($this->
getAllValue()));
   174                 case "top": $value = strtolower(trim($this->
getTopValue()));
   176                 case "bottom": $value = strtolower(trim($this->
getBottomValue()));
   178                 case "left": $value = strtolower(trim($this->
getLeftValue()));
   180                 case "right": $value = strtolower(trim($this->
getRightValue()));
   184             if (in_array($value, $pre_options)) {
   185                 $current_type = 
"pre";
   186                 $tpl->setVariable(
"PREDEFINED_SELECTED", 
'checked="checked"');
   188                 $current_type = 
"unit";
   189                 $tpl->setVariable(
"NUMERIC_SELECTED", 
'checked="checked"');
   192                 foreach ($unit_options as $u) {
   193                     if (substr($value, strlen($value) - strlen($u)) == $u) {
   197                 $disp_val = substr($value, 0, strlen($value) - strlen($current_unit));
   198                 if ($current_unit == 
"") {
   199                     $current_unit = 
"px";
   201                 $tpl->setVariable(
"VAL_NUM", $disp_val);
   204             foreach ($unit_options as $option) {
   205                 $tpl->setCurrentBlock(
"unit_option");
   206                 $tpl->setVariable(
"VAL_UNIT", $option);
   207                 $tpl->setVariable(
"TXT_UNIT", $option);
   208                 if ($current_type == 
"unit" && $current_unit == $option) {
   209                     $tpl->setVariable(
"UNIT_SELECTED", 
'selected="selected"');
   211                 $tpl->parseCurrentBlock();
   214             foreach ($pre_options as $option) {
   215                 $tpl->setCurrentBlock(
"pre_option");
   216                 $tpl->setVariable(
"VAL_PRE", $option);
   217                 $tpl->setVariable(
"TXT_PRE", $option);
   218                 if ($current_type == 
"pre" && $value == $option) {
   219                     $tpl->setVariable(
"PRE_SELECTED", 
'selected="selected"');
   221                 $tpl->parseCurrentBlock();
   224             $tpl->setVariable(
"POSTVAR", $this->
getPostVar());
   225             $tpl->setVariable(
"TXT_DIR", 
$lng->
txt(
"sty_$dir"));
   226             $tpl->setVariable(
"DIR", $dir);
   228             $layout_tpl->setVariable(strtoupper($dir), $tpl->get());
   230         $layout_tpl->setVariable(
"COLSPAN", 
"2");
   233         $a_tpl->
setVariable(
"PROP_GENERIC", $layout_tpl->get());
   239         if ($a_values[$this->
getPostVar()][
"all"][
"type"] == 
"predefined") {
   243                 $a_values[$this->
getPostVar()][
"all"][
"num_unit"]);
   245         if ($a_values[$this->
getPostVar()][
"bottom"][
"type"] == 
"predefined") {
   249                 $a_values[$this->
getPostVar()][
"bottom"][
"num_unit"]);
   251         if ($a_values[$this->
getPostVar()][
"top"][
"type"] == 
"predefined") {
   255                 $a_values[$this->
getPostVar()][
"top"][
"num_unit"]);
   257         if ($a_values[$this->
getPostVar()][
"left"][
"type"] == 
"predefined") {
   261                 $a_values[$this->
getPostVar()][
"left"][
"num_unit"]);
   263         if ($a_values[$this->
getPostVar()][
"right"][
"type"] == 
"predefined") {
   267                 $a_values[$this->
getPostVar()][
"right"][
"num_unit"]);
 parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
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...
 
static _getStyleParameterNumericUnits(bool $a_no_percentage=false)
 
setVariable($variable, $value='')
Sets a variable value. 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
__construct(Container $dic, ilPlugin $plugin)
 
static _getStyleParameterValues(string $par)