MediaWiki master
HTMLEditTools.php
Go to the documentation of this file.
1<?php
2
4
6
7/*
8 * @stable to extend
9 */
11 public function getInputHTML( $value ) {
12 return '';
13 }
14
15 public function getTableRow( $value ) {
16 $msg = $this->formatMsg();
17
18 return '<tr><td></td><td class="mw-input">' .
19 '<div class="mw-editTools">' .
20 $msg->parseAsBlock() .
21 "</div></td></tr>\n";
22 }
23
29 public function getDiv( $value ) {
30 $msg = $this->formatMsg();
31
32 return '<div class="mw-editTools">' . $msg->parseAsBlock() . '</div>';
33 }
34
40 public function getRaw( $value ) {
41 return $this->getDiv( $value );
42 }
43
44 protected function formatMsg() {
45 if ( empty( $this->mParams['message'] ) ) {
46 $msg = $this->msg( 'edittools' );
47 } else {
48 $msg = $this->getMessage( $this->mParams['message'] );
49 if ( $msg->isDisabled() ) {
50 $msg = $this->msg( 'edittools' );
51 }
52 }
53 $msg->inContentLanguage();
54
55 return $msg;
56 }
57}
58
60class_alias( HTMLEditTools::class, 'HTMLEditTools' );
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
getTableRow( $value)
Get the complete table row for the input, including help text, labels, and whatever.
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.