wiki.techinc.nl/includes/htmlform/fields/HTMLEditTools.php
Umherirrender 255d76f2a1 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable

For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore

Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
2018-01-01 14:10:16 +01:00

50 lines
989 B
PHP

<?php
class HTMLEditTools extends HTMLFormField {
public function getInputHTML( $value ) {
return '';
}
public function getTableRow( $value ) {
$msg = $this->formatMsg();
return '<tr><td></td><td class="mw-input">' .
'<div class="mw-editTools">' .
$msg->parseAsBlock() .
"</div></td></tr>\n";
}
/**
* @param string $value
* @return string
* @since 1.20
*/
public function getDiv( $value ) {
$msg = $this->formatMsg();
return '<div class="mw-editTools">' . $msg->parseAsBlock() . '</div>';
}
/**
* @param string $value
* @return string
* @since 1.20
*/
public function getRaw( $value ) {
return $this->getDiv( $value );
}
protected function formatMsg() {
if ( empty( $this->mParams['message'] ) ) {
$msg = $this->msg( 'edittools' );
} else {
$msg = $this->getMessage( $this->mParams['message'] );
if ( $msg->isDisabled() ) {
$msg = $this->msg( 'edittools' );
}
}
$msg->inContentLanguage();
return $msg;
}
}