MediaWiki REL1_41
HTMLEditTools.php
Go to the documentation of this file.
1<?php
2
3/*
4 * @stable to extend
5 */
7 public function getInputHTML( $value ) {
8 return '';
9 }
10
11 public function getTableRow( $value ) {
12 $msg = $this->formatMsg();
13
14 return '<tr><td></td><td class="mw-input">' .
15 '<div class="mw-editTools">' .
16 $msg->parseAsBlock() .
17 "</div></td></tr>\n";
18 }
19
25 public function getDiv( $value ) {
26 $msg = $this->formatMsg();
27
28 return '<div class="mw-editTools">' . $msg->parseAsBlock() . '</div>';
29 }
30
36 public function getRaw( $value ) {
37 return $this->getDiv( $value );
38 }
39
40 protected function formatMsg() {
41 if ( empty( $this->mParams['message'] ) ) {
42 $msg = $this->msg( 'edittools' );
43 } else {
44 $msg = $this->getMessage( $this->mParams['message'] );
45 if ( $msg->isDisabled() ) {
46 $msg = $this->msg( 'edittools' );
47 }
48 }
49 $msg->inContentLanguage();
50
51 return $msg;
52 }
53}
getTableRow( $value)
Get the complete table row for the input, including help text, labels, and whatever.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
The parent class to generate form fields.
getMessage( $value)
Turns a *-message parameter (which could be a MessageSpecifier, or a message name,...
msg( $key,... $params)
Get a translated interface message.