Swat/SwatEntry.php
protected function getInputTag()
    {
        $tag = new SwatHtmlTag('input');
        $tag->type = 'text';
        $tag->name = $this->autocomplete ? $this->id : $this->getNonce();
        $tag->id = $this->autocomplete ? $this->id : $this->getNonce();
        $tag->class = $this->getCSSClassString();

        // event handlers to select on focus
        if ($this->select_on_focus) {
            $tag->onmousedown = 'if(!this._focused){this._focus_click=true;}';
            $tag->onmouseup =
                'if(this._focus_click){' .
                'this.select();this._focus_click=false;}';

            $tag->onfocus =
                'this._focused=true;' .
                'if(!this._focus_click){this.select();}';

            $tag->onblur = 'this._focused=false;this._focus_click=false;';
        }

        if ($this->read_only) {
            $tag->readonly = 'readonly';
        }

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

        $value = $this->getDisplayValue($this->value);

        // escape value for display because we actually want to show entities
        // for editing
        $value = htmlspecialchars($value);
        $tag->value = $value;

        $tag->size = $this->size;
        $tag->maxlength = $this->maxlength;
        $tag->accesskey = $this->access_key;
        $tag->tabindex = $this->tab_index;

        if ($this->placeholder != '') {
            $tag->placeholder = $this->placeholder;
        }

        return $tag;
    }
protected function getInputTag()
    {
        $tag = new SwatHtmlTag('input');
        $tag->type = 'text';
        $tag->name = $this->autocomplete ? $this->id : $this->getNonce();
        $tag->id = $this->autocomplete ? $this->id : $this->getNonce();
        $tag->class = $this->getCSSClassString();

        // event handlers to select on focus
        if ($this->select_on_focus) {
            $tag->onmousedown = 'if(!this._focused){this._focus_click=true;}';
            $tag->onmouseup =
                'if(this._focus_click){' .
                'this.select();this._focus_click=false;}';

            $tag->onfocus =
                'this._focused=true;' .
                'if(!this._focus_click){this.select();}';

            $tag->onblur = 'this._focused=false;this._focus_click=false;';
        }

        if ($this->read_only) {
            $tag->readonly = 'readonly';
        }

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

        $value = $this->getDisplayValue($this->value);

        // escape value for display because we actually want to show entities
        // for editing
        $value = htmlspecialchars($value);
        $tag->value = $value;

        $tag->size = $this->size;
        $tag->maxlength = $this->maxlength;
        $tag->accesskey = $this->access_key;
        $tag->tabindex = $this->tab_index;

        if ($this->placeholder != '') {
            $tag->placeholder = $this->placeholder;
        }

        return $tag;
    }
protected function getInputTag ( ) { $ tag = new SwatHtmlTag ( 'input' ) ; $ tag -> type = 'text' ; $ tag -> name = $ this -> autocomplete ? $ this -> id : $ this -> getNonce ( ) ; $ tag -> id = $ this -> autocomplete ? $ this -> id : $ this -> getNonce ( ) ; $ tag -> class = $ this -> getCSSClassString ( ) ; // event handlers to select on focus if ( $ this -> select_on_focus ) { $ tag -> onmousedown = 'if(!this._focused){this._focus_click=true;}' ; $ tag -> onmouseup = 'if(this._focus_click){' . 'this.select();this._focus_click=false;}' ; $ tag -> onfocus = 'this._focused=true;' . 'if(!this._focus_click){this.select();}' ; $ tag -> onblur = 'this._focused=false;this._focus_click=false;' ; } if ( $ this -> read_only ) { $ tag -> readonly = 'readonly' ; } if ( ! $ this -> isSensitive ( ) ) { $ tag -> disabled = 'disabled' ; } $ value = $ this -> getDisplayValue ( $ this -> value ) ; // escape value for display because we actually want to show entities // for editing $ value = htmlspecialchars ( $ value ) ; $ tag -> value = $ value ; $ tag -> size = $ this -> size ; $ tag -> maxlength = $ this -> maxlength ; $ tag -> accesskey = $ this -> access_key ; $ tag -> tabindex = $ this -> tab_index ; if ( $ this -> placeholder != '' ) { $ tag -> placeholder = $ this -> placeholder ; } return $ tag ; }
Get the input tag to display

Can be used by sub-classes to change the setup of the input tag.

@return SwatHtmlTag Input tag to display.
Get the input tag to display