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

        SwatWidget::display();

        if ($this->alt == '') {
            throw new SwatException(
                'The $alt property of SwatImageButton must be set to an ' .
                    'appropriate value. The "alt" attribute is required in ' .
                    'HTML5 and can not be an empty string.'
            );
        }

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'image';
        $input_tag->id = $this->id;
        $input_tag->name = $this->id;
        $input_tag->value = $this->title;
        $input_tag->alt = $this->alt;
        $input_tag->class = $this->getCSSClassString();

        if (count($this->values)) {
            $input_tag->src = vsprintf($this->image, $this->values);
        } else {
            $input_tag->src = $this->image;
        }

        $input_tag->tabindex = $this->tab_index;
        $input_tag->accesskey = $this->access_key;

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

        $input_tag->display();

        if (
            $this->show_processing_throbber ||
            $this->confirmation_message !== null
        ) {
            Swat::displayInlineJavaScript($this->getInlineJavaScript());
        }
    }
public function display()
    {
        if (!$this->visible) {
            return;
        }

        SwatWidget::display();

        if ($this->alt == '') {
            throw new SwatException(
                'The $alt property of SwatImageButton must be set to an ' .
                    'appropriate value. The "alt" attribute is required in ' .
                    'HTML5 and can not be an empty string.'
            );
        }

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'image';
        $input_tag->id = $this->id;
        $input_tag->name = $this->id;
        $input_tag->value = $this->title;
        $input_tag->alt = $this->alt;
        $input_tag->class = $this->getCSSClassString();

        if (count($this->values)) {
            $input_tag->src = vsprintf($this->image, $this->values);
        } else {
            $input_tag->src = $this->image;
        }

        $input_tag->tabindex = $this->tab_index;
        $input_tag->accesskey = $this->access_key;

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

        $input_tag->display();

        if (
            $this->show_processing_throbber ||
            $this->confirmation_message !== null
        ) {
            Swat::displayInlineJavaScript($this->getInlineJavaScript());
        }
    }
public function display ( ) { if ( ! $ this -> visible ) { return ; } SwatWidget :: display ( ) ; if ( $ this -> alt == '' ) { throw new SwatException ( 'The $alt property of SwatImageButton must be set to an ' . 'appropriate value. The "alt" attribute is required in ' . 'HTML5 and can not be an empty string.' ) ; } $ input_tag = new SwatHtmlTag ( 'input' ) ; $ input_tag -> type = 'image' ; $ input_tag -> id = $ this -> id ; $ input_tag -> name = $ this -> id ; $ input_tag -> value = $ this -> title ; $ input_tag -> alt = $ this -> alt ; $ input_tag -> class = $ this -> getCSSClassString ( ) ; if ( count ( $ this -> values ) ) { $ input_tag -> src = vsprintf ( $ this -> image , $ this -> values ) ; } else { $ input_tag -> src = $ this -> image ; } $ input_tag -> tabindex = $ this -> tab_index ; $ input_tag -> accesskey = $ this -> access_key ; if ( ! $ this -> isSensitive ( ) ) { $ input_tag -> disabled = 'disabled' ; } $ input_tag -> display ( ) ; if ( $ this -> show_processing_throbber || $ this -> confirmation_message !== null ) { Swat :: displayInlineJavaScript ( $ this -> getInlineJavaScript ( ) ) ; } }
Displays this image button

Outputs an XHTML input tag.
Displays this image button