24include_once(
"./Services/Form/classes/class.ilCheckboxOption.php");
 
   55        $this->lng = 
$DIC->language();
 
   56        parent::__construct($a_title, $a_postvar);
 
   57        $this->
setType(
"checkboxgroup");
 
   67        $this->use_values_as_keys = $a_val;
 
   87        $this->options[] = $a_option;
 
   97        foreach ($a_options as 
$key => $label) {
 
   98            if (is_string($label)) {
 
  100                $this->options[] = $chb;
 
  102                $this->options[] = $label;
 
  124        $this->value = $a_value;
 
  146            foreach ($option->getSubItems() as $item) {
 
  147                $item->setValueByArray($a_values);
 
  168            foreach ($option->getSubItems() as $item) {
 
  169                $item_ok = $item->checkInput();
 
  170                if (!$item_ok && in_array($option->getValue(), 
$_POST[$this->getPostVar()])) {
 
  185        $a_tpl->setCurrentBlock(
"prop_generic");
 
  186        $a_tpl->setVariable(
"PROP_GENERIC", $this->
render());
 
  187        $a_tpl->parseCurrentBlock();
 
  202            foreach ($option->getSubItems() as $item) {
 
  203                if ($item->getType() != 
"section_header") {
 
  204                    $ret = $item->getItemByPostVar($a_post_var);
 
  205                    if (is_object(
$ret)) {
 
  222        return $this->
render(
'toolbar');
 
  227        $tpl = 
new ilTemplate(
"tpl.prop_checkbox_group.html", 
true, 
true, 
"Services/Form");
 
  231            if ($option->getInfo() != 
"") {
 
  232                $tpl->setCurrentBlock(
"checkbox_option_desc");
 
  233                $tpl->setVariable(
"CHECKBOX_OPTION_DESC", $option->getInfo());
 
  234                $tpl->parseCurrentBlock();
 
  238            if (count($option->getSubItems()) > 0) {
 
  239                $tpl->setCurrentBlock(
"checkbox_option_subform");
 
  241                $pf->setMode(
"subform");
 
  242                $pf->setItems($option->getSubItems());
 
  243                $tpl->setVariable(
"SUB_FORM", $pf->getContent());
 
  244                $tpl->setVariable(
"SOP_ID", $this->
getFieldId() . 
"_" . $option->getValue());
 
  245                if ($pf->getMultipart()) {
 
  248                $tpl->parseCurrentBlock();
 
  249                if ($pf->getMultipart()) {
 
  254            $tpl->setCurrentBlock(
"prop_checkbox_option");
 
  258                $tpl->setVariable(
"VAL_CHECKBOX_OPTION", $option->getValue());
 
  260                $tpl->setVariable(
"POST_VAR", $this->
getPostVar() . 
'[' . $option->getValue() . 
']');
 
  261                $tpl->setVariable(
"VAL_CHECKBOX_OPTION", 
"1");
 
  264            $tpl->setVariable(
"OP_ID", $this->
getFieldId() . 
"_" . $option->getValue());
 
  267            if ($this->
getDisabled() or $option->getDisabled()) {
 
  268                $tpl->setVariable(
'DISABLED', 
'disabled="disabled" ');
 
  273                    if (in_array($option->getValue(), $this->getValue())) {
 
  275                            "CHK_CHECKBOX_OPTION",
 
  281                    if ($cval[$option->getValue()] == 1) {
 
  283                            "CHK_CHECKBOX_OPTION",
 
  289            $tpl->setVariable(
"TXT_CHECKBOX_OPTION", $option->getTitle());
 
  292            $tpl->parseCurrentBlock();
 
  306        $subInputItems = parent::getSubInputItemsRecursive();
 
  311            $subInputItems = array_merge($subInputItems, $option->getSubInputItemsRecursive());
 
  314        return $subInputItems;
 
An exception for terminatinating execution or to throw for unit testing.
special template class to simplify handling of ITX/PEAR
Interface for property form input GUI classes that can be used in table filters.