19 declare(strict_types=1);
36 string $a_postvar =
"" 40 $this->
lng = $DIC->language();
45 public function setValue(
string $a_value): void
47 $this->value = $a_value;
67 $this->optiontitle = $a_optiontitle;
77 $checked = $a_values[$this->
getPostVar()] ??
false;
80 $item->setValueByArray($a_values);
86 $this->additional_attributes = $a_attrs;
120 public function render($a_mode =
''): string
122 $tpl =
new ilTemplate(
"tpl.prop_checkbox.html",
true,
true,
"components/ILIAS/Form");
124 $tpl->setVariable(
"POST_VAR", $this->
getPostVar());
126 $tpl->setVariable(
"PROPERTY_VALUE", $this->
getValue());
140 'disabled="disabled"' 144 if ($a_mode ==
"toolbar") {
148 $tpl->setVariable(
"STYLE_PAR",
'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
153 $tpl->setVariable(
'DESCRIBED_BY_FIELD_ID', $this->
getFieldId());
181 $data = unserialize($a_data);
191 $html = $this->
render(
'toolbar');
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
checked()
description: > Example for rendering a Checked Glyph.
setVariable($variable, $value='')
Sets a variable value.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
__construct(Container $dic, ilPlugin $plugin)