code: protected function addCheckbox($tag)
      {
          if (! isset($this->checkboxes[$tag->getName()])) {
              $this->widgets[]                   = $tag;
              $this->checkboxes[$tag->getName()] = count($this->widgets) - 1;
          } else {
              $index = $this->checkboxes[$tag->getName()];
              if (! is_a($this->widgets[$index], 'SimpleCheckboxGroup')) {
                  $previous              = $this->widgets[$index];
                  $this->widgets[$index] = new SimpleCheckboxGroup();
                  $this->widgets[$index]->addWidget($previous);
              }
              $this->widgets[$index]->addWidget($tag);
          }
      }
docs: Adds a checkbox, making it a group on a repeated name.
  
  @param SimpleCheckboxTag $tag   Incoming form control.