| @@ 15-23 (lines=9) @@ | ||
| 12 | * - placeholder/placeholder-message: set HTML placeholder attribute |
|
| 13 | * - spellcheck: set HTML spellcheck attribute |
|
| 14 | */ |
|
| 15 | public function __construct( $params ) { |
|
| 16 | parent::__construct( $params ); |
|
| 17 | ||
| 18 | if ( isset( $params['placeholder-message'] ) ) { |
|
| 19 | $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->parse(); |
|
| 20 | } elseif ( isset( $params['placeholder'] ) ) { |
|
| 21 | $this->mPlaceholder = $params['placeholder']; |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| 25 | function getCols() { |
|
| 26 | return isset( $this->mParams['cols'] ) ? $this->mParams['cols'] : static::DEFAULT_COLS; |
|
| @@ 15-23 (lines=9) @@ | ||
| 12 | * - persistent: upon unsuccessful requests, retain the value (defaults to true, except |
|
| 13 | * for password fields) |
|
| 14 | */ |
|
| 15 | public function __construct( $params ) { |
|
| 16 | parent::__construct( $params ); |
|
| 17 | ||
| 18 | if ( isset( $params['placeholder-message'] ) ) { |
|
| 19 | $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->parse(); |
|
| 20 | } elseif ( isset( $params['placeholder'] ) ) { |
|
| 21 | $this->mPlaceholder = $params['placeholder']; |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| 25 | function getSize() { |
|
| 26 | return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 45; |
|