Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / htmlform / fields / HTMLEditTools.php
blobc3a49cc213099d3a5b8215b3359a19fe4e952b81
1 <?php
3 namespace MediaWiki\HTMLForm\Field;
5 use MediaWiki\HTMLForm\HTMLFormField;
7 /*
8 * @stable to extend
9 */
10 class HTMLEditTools extends HTMLFormField {
11 public function getInputHTML( $value ) {
12 return '';
15 public function getTableRow( $value ) {
16 $msg = $this->formatMsg();
18 return '<tr><td></td><td class="mw-input">' .
19 '<div class="mw-editTools">' .
20 $msg->parseAsBlock() .
21 "</div></td></tr>\n";
24 /**
25 * @param string $value
26 * @return string
27 * @since 1.20
29 public function getDiv( $value ) {
30 $msg = $this->formatMsg();
32 return '<div class="mw-editTools">' . $msg->parseAsBlock() . '</div>';
35 /**
36 * @param string $value
37 * @return string
38 * @since 1.20
40 public function getRaw( $value ) {
41 return $this->getDiv( $value );
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' );
53 $msg->inContentLanguage();
55 return $msg;
59 /** @deprecated class alias since 1.42 */
60 class_alias( HTMLEditTools::class, 'HTMLEditTools' );