40 $this->mSort = $this->
getRequest()->getText(
'sort' );
52 parent::__construct();
71 return parent::getBody();
84 $body = parent::getBody();
103 $body = parent::getBody();
106 $pout->
setText( $navigation . $body . $navigation );
122 foreach ( $fields as $field => $name ) {
123 if (
strval( $name ) ==
'' ) {
124 $s .= Html::rawElement(
'th', [],
"\u{00A0}" ) .
"\n";
130 if ( $this->mSort == $field ) {
135 $class =
"$sortClass mw-datatable-is-sorted mw-datatable-is-descending";
140 $class =
"$sortClass mw-datatable-is-sorted mw-datatable-is-ascending";
147 $s .= Html::rawElement(
'th', [
'class' => $class ],
$link ) .
"\n";
149 $s .= Html::element(
'th', [], $name ) .
"\n";
154 $ret = Html::openElement(
'table', [
155 'class' =>
" $tableClass" ]
157 $ret .= Html::rawElement(
'thead', [], Html::rawElement(
'tr', [],
"\n" .
$s .
"\n" ) );
158 $ret .= Html::openElement(
'tbody' ) .
"\n";
168 return "</tbody></table>\n";
177 $msgEmpty = $this->
msg(
'table_pager_empty' )->text();
178 return Html::rawElement(
'tr', [],
179 Html::element(
'td', [
'colspan' => $colspan ], $msgEmpty ) );
188 $this->mCurrentRow = $row;
189 $s = Html::openElement(
'tr', $this->
getRowAttrs( $row ) ) .
"\n";
192 foreach ( $fieldNames as $field => $name ) {
193 $value = $row->$field ??
null;
196 if ( $formatted ==
'' ) {
197 $formatted =
"\u{00A0}";
203 $s .= Html::closeElement(
'tr' ) .
"\n";
230 if ( $class ===
'' ) {
257 return [
'class' =>
'TablePager_col_' .
$field ];
273 return 'mw-datatable';
280 return 'TablePager_nav';
287 return 'TablePager_sort';
301 $types = [
'first',
'prev',
'next',
'last' ];
309 foreach ( $types as
$type ) {
316 'classes' => [
'TablePager-button-' .
$type ],
317 'flags' => [
'progressive' ],
319 'label' => $this->
msg(
'table_pager_' . $type )->
text(),
321 $title->getLinkURL(
$queries[
$type ] + $this->getDefaultQuery() ) :
323 'icon' =>
$type ===
'prev' ?
'previous' :
$type,
339 return [
'mediawiki.pager.tablePager',
'oojs-ui.styles.icons-movement' ];
349 $select =
new XmlSelect(
'limit',
false, $this->mLimit );
352 $select->setAttribute( $name,
$value );
354 return $select->getHTML();
365 # Add the current limit from the query string
366 # to avoid that the limit is lost after clicking Go next time
367 if ( !
in_array( $this->mLimit, $this->mLimitsShown ) ) {
369 sort( $this->mLimitsShown );
372 foreach ( $this->mLimitsShown as $key =>
$value ) {
373 # The pair is either $index => $limit, in which case the $value
374 # will be numeric, or $limit => $text, in which case the $value
383 $ret[$text] = $limit;
397 $blacklist = (
array)$blacklist;
399 foreach ( $blacklist as $name ) {
404 $s .= Html::hidden( $name,
$value ) .
"\n";
415 return Html::rawElement(
431 # Make the select with some explanatory text
432 $msgSubmit = $this->
msg(
'table_pager_limit_submit' )->escaped();
434 return $this->
msg(
'table_pager_limit' )
436 "\n<input type=\"submit\" value=\"$msgSubmit\"/>\n" .
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfScript( $script='index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
setContext(IContextSource $context)
Class for generating HTML <select> or <datalist> elements.
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 & $ret
usually copyright or history_copyright This message must be in HTML not wikitext & $link
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
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
processing should stop and the error should be shown to the user * false
Interface for objects which can provide a MediaWiki context on request.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))