Swat/SwatCheckboxList.php
protected function displayOption(SwatOption $option, $index)
    {
        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'checkbox';
        $input_tag->name = $this->id . '[' . $index . ']';
        $input_tag->value = (string) $option->value;
        $input_tag->id = $this->id . '_' . $index;
        $input_tag->removeAttribute('checked');

        if (in_array($option->value, $this->values)) {
            $input_tag->checked = 'checked';
        }

        if (!$this->isSensitive()) {
            $input_tag->disabled = 'disabled';
        }

        $li_tag = $this->getLiTag($option);

        $li_tag->open();
        echo '<span class="swat-checkbox-wrapper">';
        $input_tag->display();
        echo '<span class="swat-checkbox-shim"></span>';
        echo '</span>';
        $this->displayOptionLabel($option, $index);
        $li_tag->close();
    }
protected function displayOption(SwatOption $option, $index)
    {
        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'checkbox';
        $input_tag->name = $this->id . '[' . $index . ']';
        $input_tag->value = (string) $option->value;
        $input_tag->id = $this->id . '_' . $index;
        $input_tag->removeAttribute('checked');

        if (in_array($option->value, $this->values)) {
            $input_tag->checked = 'checked';
        }

        if (!$this->isSensitive()) {
            $input_tag->disabled = 'disabled';
        }

        $li_tag = $this->getLiTag($option);

        $li_tag->open();
        echo '<span class="swat-checkbox-wrapper">';
        $input_tag->display();
        echo '<span class="swat-checkbox-shim"></span>';
        echo '</span>';
        $this->displayOptionLabel($option, $index);
        $li_tag->close();
    }
protected function displayOption ( SwatOption $ option , $ index ) { $ input_tag = new SwatHtmlTag ( 'input' ) ; $ input_tag -> type = 'checkbox' ; $ input_tag -> name = $ this -> id . '[' . $ index . ']' ; $ input_tag -> value = ( string ) $ option -> value ; $ input_tag -> id = $ this -> id . '_' . $ index ; $ input_tag -> removeAttribute ( 'checked' ) ; if ( in_array ( $ option -> value , $ this -> values ) ) { $ input_tag -> checked = 'checked' ; } if ( ! $ this -> isSensitive ( ) ) { $ input_tag -> disabled = 'disabled' ; } $ li_tag = $ this -> getLiTag ( $ option ) ; $ li_tag -> open ( ) ; echo '<span class="swat-checkbox-wrapper">' ; $ input_tag -> display ( ) ; echo '<span class="swat-checkbox-shim"></span>' ; echo '</span>' ; $ this -> displayOptionLabel ( $ option , $ index ) ; $ li_tag -> close ( ) ; }
Helper method to display a single option of this checkbox list

@param SwatOption $option the option to display.
@param integer $index a numeric index indicating which option is being
displayed. Starts as 0.
Helper method to display a single option of this checkbox list