original_string: protected function renderSingle()
      {
          $strHtml = '';
  
          // Apply label?
          if (in_array($this->getType(), ['checkbox', 'radio']))
              $strHtml .= '<label class="sked-input-multi">';
  
          // Build opening tag
          $strHtml .= '<' . $this->strElementType . ' ' . $this->renderAttribs() . '>';
  
          // Optional - Build inner HTML
          if (!empty($this->aOptions)) {
              // An indexed array means use the label as the value also.
              $bLabelIsValue = isset($this->aOptions[0]);
              foreach ($this->aOptions as $mValue => $strLabel) {
                  if ($bLabelIsValue)
                      $mValue = $strLabel;
                  $strSelected = isset($this->mValue) && (string)$this->mValue === (string)$mValue
                      ? ' selected' : '';
                  $strHtml .= '<option value="' . $mValue . '"' . $strSelected . '>'
                      . $strLabel . '</option>';
              }
          } elseif ('textarea' === $this->strElementType) {
              $strHtml .= $this->mValue;
          }
  
          // Optional - Build closing tag
          if ('input' !== $this->strElementType)
              $strHtml .= '</' . $this->strElementType . '>';
  
          // Close label?
          if (in_array($this->getType(), ['checkbox', 'radio']))
              $strHtml .= '</label>';
  
          return $strHtml;
      }
code: protected function renderSingle()
      {
          $strHtml = '';
  
          // Apply label?
          if (in_array($this->getType(), ['checkbox', 'radio']))
              $strHtml .= '<label class="sked-input-multi">';
  
          // Build opening tag
          $strHtml .= '<' . $this->strElementType . ' ' . $this->renderAttribs() . '>';
  
          // Optional - Build inner HTML
          if (!empty($this->aOptions)) {
              // An indexed array means use the label as the value also.
              $bLabelIsValue = isset($this->aOptions[0]);
              foreach ($this->aOptions as $mValue => $strLabel) {
                  if ($bLabelIsValue)
                      $mValue = $strLabel;
                  $strSelected = isset($this->mValue) && (string)$this->mValue === (string)$mValue
                      ? ' selected' : '';
                  $strHtml .= '<option value="' . $mValue . '"' . $strSelected . '>'
                      . $strLabel . '</option>';
              }
          } elseif ('textarea' === $this->strElementType) {
              $strHtml .= $this->mValue;
          }
  
          // Optional - Build closing tag
          if ('input' !== $this->strElementType)
              $strHtml .= '</' . $this->strElementType . '>';
  
          // Close label?
          if (in_array($this->getType(), ['checkbox', 'radio']))
              $strHtml .= '</label>';
  
          return $strHtml;
      }
code_tokens: protected function renderSingle ( ) { $ strHtml = '' ; // Apply label? if ( in_array ( $ this -> getType ( ) , [ 'checkbox' , 'radio' ] ) ) $ strHtml .= '<label class="sked-input-multi">' ; // Build opening tag $ strHtml .= '<' . $ this -> strElementType . ' ' . $ this -> renderAttribs ( ) . '>' ; // Optional - Build inner HTML if ( ! empty ( $ this -> aOptions ) ) { // An indexed array means use the label as the value also. $ bLabelIsValue = isset ( $ this -> aOptions [ 0 ] ) ; foreach ( $ this -> aOptions as $ mValue => $ strLabel ) { if ( $ bLabelIsValue ) $ mValue = $ strLabel ; $ strSelected = isset ( $ this -> mValue ) && ( string ) $ this -> mValue === ( string ) $ mValue ? ' selected' : '' ; $ strHtml .= '<option value="' . $ mValue . '"' . $ strSelected . '>' . $ strLabel . '</option>' ; } } elseif ( 'textarea' === $ this -> strElementType ) { $ strHtml .= $ this -> mValue ; } // Optional - Build closing tag if ( 'input' !== $ this -> strElementType ) $ strHtml .= '</' . $ this -> strElementType . '>' ; // Close label? if ( in_array ( $ this -> getType ( ) , [ 'checkbox' , 'radio' ] ) ) $ strHtml .= '</label>' ; return $ strHtml ; }
docstring: Render a single element.
  
  @return string HTML
docstring_tokens: Render a single element .