Swat/SwatCheckbox.php
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $this->getForm()->addHiddenField($this->id . '_submitted', 1);

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'checkbox';
        $input_tag->class = $this->getCSSClassString();
        $input_tag->name = $this->id;
        $input_tag->id = $this->id;
        $input_tag->value = '1';
        $input_tag->accesskey = $this->access_key;
        $input_tag->tabindex = $this->tab_index;

        if ($this->value) {
            $input_tag->checked = 'checked';
        }

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

        echo '<span class="swat-checkbox-wrapper">';
        $input_tag->display();
        echo '<span class="swat-checkbox-shim"></span>';
        echo '</span>';
    }
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $this->getForm()->addHiddenField($this->id . '_submitted', 1);

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'checkbox';
        $input_tag->class = $this->getCSSClassString();
        $input_tag->name = $this->id;
        $input_tag->id = $this->id;
        $input_tag->value = '1';
        $input_tag->accesskey = $this->access_key;
        $input_tag->tabindex = $this->tab_index;

        if ($this->value) {
            $input_tag->checked = 'checked';
        }

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

        echo '<span class="swat-checkbox-wrapper">';
        $input_tag->display();
        echo '<span class="swat-checkbox-shim"></span>';
        echo '</span>';
    }
public function display ( ) { if ( ! $ this -> visible ) { return ; } parent :: display ( ) ; $ this -> getForm ( ) -> addHiddenField ( $ this -> id . '_submitted' , 1 ) ; $ input_tag = new SwatHtmlTag ( 'input' ) ; $ input_tag -> type = 'checkbox' ; $ input_tag -> class = $ this -> getCSSClassString ( ) ; $ input_tag -> name = $ this -> id ; $ input_tag -> id = $ this -> id ; $ input_tag -> value = '1' ; $ input_tag -> accesskey = $ this -> access_key ; $ input_tag -> tabindex = $ this -> tab_index ; if ( $ this -> value ) { $ input_tag -> checked = 'checked' ; } if ( ! $ this -> isSensitive ( ) ) { $ input_tag -> disabled = 'disabled' ; } echo '<span class="swat-checkbox-wrapper">' ; $ input_tag -> display ( ) ; echo '<span class="swat-checkbox-shim"></span>' ; echo '</span>' ; }
Displays this checkbox

Outputs an appropriate XHTML tag.
Displays this checkbox