MediaWiki master
HTMLEditTools.php
Go to the documentation of this file.
1<?php
2
4
7
13 public function getInputHTML( $value ) {
14 return '';
15 }
16
18 public function getTableRow( $value ) {
19 $msg = $this->formatMsg();
20
21 return '<tr><td></td><td class="mw-input">' .
22 '<div class="mw-editTools">' .
23 $msg->parseAsBlock() .
24 "</div></td></tr>\n";
25 }
26
32 public function getDiv( $value ) {
33 $msg = $this->formatMsg();
34
35 return '<div class="mw-editTools">' . $msg->parseAsBlock() . '</div>';
36 }
37
43 public function getRaw( $value ) {
44 return $this->getDiv( $value );
45 }
46
50 protected function formatMsg() {
51 if ( empty( $this->mParams['message'] ) ) {
52 $msg = $this->msg( 'edittools' );
53 } else {
54 $msg = $this->getMessage( $this->mParams['message'] );
55 if ( $msg->isDisabled() ) {
56 $msg = $this->msg( 'edittools' );
57 }
58 }
59 $msg->inContentLanguage();
60
61 return $msg;
62 }
63}
64
66class_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.
The Message class deals with fetching and processing of interface message into a variety of formats.
Definition Message.php:144