protected function GetItemHtml($objItem, $intIndex, $strTabIndex, $blnWrapLabel)
 {
     $objLabelStyles = new QTagStyler();
     if ($this->objItemStyle) {
         $objLabelStyles->Override($this->objItemStyle);
         // default style
     }
     if ($objItemStyle = $objItem->ItemStyle) {
         $objLabelStyles->Override($objItemStyle);
         // per item styling
     }
     $objStyles = new QTagStyler();
     $objStyles->SetHtmlAttribute('type', 'radio');
     $objStyles->SetHtmlAttribute('value', $intIndex);
     $objStyles->SetHtmlAttribute('name', $this->strControlId);
     $strIndexedId = $this->strControlId . '_' . $intIndex;
     $objStyles->SetHtmlAttribute('id', $strIndexedId);
     if ($strTabIndex) {
         $objStyles->TabIndex = $strTabIndex;
         // Use parent control tabIndex, which will cause the browser to take them in order of drawing
     }
     if (!$this->Enabled) {
         $objStyles->Enabled = false;
     }
     $strLabelText = $this->GetLabelText($objItem);
     if ($objItem->Selected) {
         $objStyles->SetHtmlAttribute('checked', 'checked');
     }
     $objStyles->SetHtmlAttribute("autocomplete", "off");
     // recommended bugfix for firefox in certain situations
     if (!$blnWrapLabel) {
         $objLabelStyles->SetHtmlAttribute('for', $strIndexedId);
     }
     $this->OverrideItemAttributes($objItem, $objStyles, $objLabelStyles);
     $strHtml = QHtml::RenderLabeledInput($strLabelText, $this->strTextAlign == QTextAlign::Left, $objStyles->RenderHtmlAttributes(), $objLabelStyles->RenderHtmlAttributes(), $blnWrapLabel);
     return $strHtml;
 }
 /**
  * Render the button code. Broken out to allow QRadioButton to use it too.
  *
  * @param $attrOverride
  * @return string
  */
 protected function RenderButton($attrOverride)
 {
     if ($this->blnChecked) {
         $attrOverride['checked'] = 'checked';
     }
     if (strlen($this->strText)) {
         $strText = $this->blnHtmlEntities ? QApplication::HtmlEntities($this->strText) : $this->strText;
         if (!$this->blnWrapLabel) {
             $strLabelAttributes = ' for="' . $this->strControlId . '"';
         } else {
             $strLabelAttributes = $this->RenderLabelAttributes();
         }
         $strCheckHtml = QHtml::RenderLabeledInput($strText, $this->strTextAlign == QTextAlign::Left, $this->RenderHtmlAttributes($attrOverride), $strLabelAttributes, $this->blnWrapLabel);
         if (!$this->blnWrapLabel) {
             // Additionally wrap in a span so we can associate the label with the checkbox visually and apply the styles
             $strCheckHtml = QHtml::RenderTag('span', $this->RenderLabelAttributes(), $strCheckHtml);
         }
     } else {
         $strCheckHtml = $this->RenderTag('input', $attrOverride, null, null, true);
     }
     return $strCheckHtml;
 }
 /**
  * Return the HTML for the given item.
  *
  * @param QListItem $objItem
  * @param integer $intIndex
  * @param string $strTabIndex
  * @param boolean $blnWrapLabel
  * @return string
  */
 protected function GetItemHtml(QListItem $objItem, $intIndex, $strTabIndex, $blnWrapLabel)
 {
     $objLabelStyles = new QTagStyler();
     if ($this->objItemStyle) {
         $objLabelStyles->Override($this->objItemStyle);
         // default style
     }
     if ($objItemStyle = $objItem->ItemStyle) {
         $objLabelStyles->Override($objItemStyle);
         // per item styling
     }
     $objStyles = new QTagStyler();
     $objStyles->SetHtmlAttribute('type', 'checkbox');
     $objStyles->SetHtmlAttribute('name', $this->strControlId . '[]');
     $objStyles->SetHtmlAttribute('value', $intIndex);
     $strIndexedId = $objItem->Id;
     $objStyles->SetHtmlAttribute('id', $strIndexedId);
     if ($strTabIndex) {
         $objStyles->TabIndex = $strTabIndex;
     }
     if (!$this->Enabled) {
         $objStyles->Enabled = false;
     }
     $strLabelText = $objItem->Label;
     if (empty($strLabelText)) {
         $strLabelText = $objItem->Name;
     }
     if ($this->blnHtmlEntities) {
         $strLabelText = QApplication::HtmlEntities($strLabelText);
     }
     if ($objItem->Selected) {
         $objStyles->SetHtmlAttribute('checked', 'checked');
     }
     if (!$blnWrapLabel) {
         $objLabelStyles->SetHtmlAttribute('for', $strIndexedId);
     }
     $objStyles->AddCssClass('qc-tableCell');
     $objLabelStyles->AddCssClass('qc-tableCell');
     $strHtml = QHtml::RenderLabeledInput($strLabelText, $this->strTextAlign == QTextAlign::Left, $objStyles->RenderHtmlAttributes(), $objLabelStyles->RenderHtmlAttributes(), $blnWrapLabel);
     return $strHtml;
 }