19 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;
105 foreach ($this->dirs as $dir) {
106 $pre_value = $input[$dir][
"pre_value"];
118 if (trim($value) !=
"") {
146 $layout_tpl =
new ilTemplate(
"tpl.prop_trbl_layout.html",
true,
true,
"components/ILIAS/Style/Content");
148 foreach ($this->dirs as $dir) {
149 $tpl =
new ilTemplate(
"tpl.prop_trbl_select.html",
true,
true,
"components/ILIAS/Style/Content");
150 $pre_options = array_merge(
156 case "all": $value = strtolower(trim($this->
getAllValue()));
158 case "top": $value = strtolower(trim($this->
getTopValue()));
160 case "bottom": $value = strtolower(trim($this->
getBottomValue()));
162 case "left": $value = strtolower(trim($this->
getLeftValue()));
164 case "right": $value = strtolower(trim($this->
getRightValue()));
168 foreach ($pre_options as $option) {
169 $tpl->setCurrentBlock(
"pre_option");
170 $tpl->setVariable(
"VAL_PRE", $option);
171 $tpl->setVariable(
"TXT_PRE", $option);
172 if ($value == $option) {
173 $tpl->setVariable(
"PRE_SELECTED",
'selected="selected"');
175 $tpl->parseCurrentBlock();
178 $tpl->setVariable(
"POSTVAR", $this->
getPostVar());
179 $tpl->setVariable(
"TXT_DIR",
$lng->
txt(
"sty_$dir"));
180 $tpl->setVariable(
"DIR", $dir);
182 $layout_tpl->setVariable(strtoupper($dir), $tpl->get());
186 $a_tpl->
setVariable(
"PROP_GENERIC", $layout_tpl->get());
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...
setVariable($variable, $value='')
Sets a variable value.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
__construct(Container $dic, ilPlugin $plugin)
static _getStyleParameterValues(string $par)