19 declare(strict_types=1);
40 protected string $hex =
"";
42 public function __construct(
string $a_title =
"",
string $a_postvar =
"")
46 $this->
lng = $DIC->language();
49 $this->dirs = array(
"all",
"top",
"bottom",
"left",
"right");
54 $a_allvalue = trim($a_allvalue);
56 $this->allvalue = $a_allvalue;
69 $a_topvalue = trim($a_topvalue);
71 $this->topvalue = $a_topvalue;
84 $a_bottomvalue = trim($a_bottomvalue);
86 $this->bottomvalue = $a_bottomvalue;
99 $a_leftvalue = trim($a_leftvalue);
101 $this->leftvalue = $a_leftvalue;
114 $a_rightvalue = trim($a_rightvalue);
116 $this->rightvalue = $a_rightvalue;
129 $this->defaultcolor = $a_defaultcolor;
139 $this->acceptnamedcolors = $a_acceptnamedcolors;
150 foreach ($this->dirs as $dir) {
151 $value = $input[$dir][
"value"];
180 $layout_tpl =
new ilTemplate(
"tpl.prop_trbl_layout.html",
true,
true,
"components/ILIAS/Style/Content");
183 "all" =>
"getAllValue",
"top" =>
"getTopValue",
184 "bottom" =>
"getBottomValue",
"left" =>
"getLeftValue",
185 "right" =>
"getRightValue");
187 foreach ($this->dirs as $dir) {
194 $tpl =
new ilTemplate(
'tpl.prop_color.html',
true,
true,
'components/ILIAS/Form');
195 $tpl->setVariable(
'COLOR_ID', $this->
getFieldId() .
"_" . $dir);
200 $tpl->setVariable(
'INIT_COLOR_SHORT', $ic);
201 $tpl->setVariable(
'POST_VAR', $this->
getPostVar());
204 $a_tpl->
setVariable(
'COLOR_DISABLED',
'disabled="disabled"');
207 $tpl->setVariable(
"POST_VAR", $this->
getPostVar() .
"[" . $dir .
"][value]");
208 $tpl->setVariable(
"PROP_COLOR_ID", $this->
getFieldId() .
"_" . $dir);
212 "PROPERTY_VALUE_COLOR",
217 $tpl->setVariable(
'INIT_COLOR',
'#' .
$value);
220 $tpl->setVariable(
"TXT_PREFIX",
$lng->
txt(
"sty_$dir"));
222 $layout_tpl->setVariable(strtoupper($dir), $tpl->get());
226 $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)