MediaWiki  1.23.6
HTMLTextAreaField.php
Go to the documentation of this file.
1 <?php
2 
4  const DEFAULT_COLS = 80;
5  const DEFAULT_ROWS = 25;
6 
7  function getCols() {
8  return isset( $this->mParams['cols'] ) ? $this->mParams['cols'] : static::DEFAULT_COLS;
9  }
10 
11  function getRows() {
12  return isset( $this->mParams['rows'] ) ? $this->mParams['rows'] : static::DEFAULT_ROWS;
13  }
14 
15  function getInputHTML( $value ) {
16  $attribs = array(
17  'id' => $this->mID,
18  'name' => $this->mName,
19  'cols' => $this->getCols(),
20  'rows' => $this->getRows(),
21  ) + $this->getTooltipAndAccessKey();
22 
23  if ( $this->mClass !== '' ) {
24  $attribs['class'] = $this->mClass;
25  }
26 
27  $allowedParams = array(
28  'placeholder',
29  'tabindex',
30  'disabled',
31  'readonly',
32  'required',
33  'autofocus'
34  );
35 
36  $attribs += $this->getAttributes( $allowedParams );
37 
38  return Html::element( 'textarea', $attribs, $value );
39  }
40 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
HTMLTextAreaField\DEFAULT_COLS
const DEFAULT_COLS
Definition: HTMLTextAreaField.php:4
HTMLFormField\$mClass
$mClass
Definition: HTMLFormField.php:15
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
HTMLFormField
The parent class to generate form fields.
Definition: HTMLFormField.php:7
HTMLTextAreaField\getInputHTML
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
Definition: HTMLTextAreaField.php:15
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
HTMLTextAreaField\getCols
getCols()
Definition: HTMLTextAreaField.php:7
$value
$value
Definition: styleTest.css.php:45
HTMLTextAreaField\DEFAULT_ROWS
const DEFAULT_ROWS
Definition: HTMLTextAreaField.php:5
HTMLTextAreaField\getRows
getRows()
Definition: HTMLTextAreaField.php:11
HTMLFormField\getTooltipAndAccessKey
getTooltipAndAccessKey()
Returns the attributes required for the tooltip and accesskey.
Definition: HTMLFormField.php:479
$attribs
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
Definition: hooks.txt:1530
HTMLFormField\getAttributes
getAttributes(array $list)
Returns the given attributes from the parameters.
Definition: HTMLFormField.php:493
HTMLTextAreaField
Definition: HTMLTextAreaField.php:3