This method is very specific to the installer and is only used in one
place, in WebInstaller, and should probably be moved there.
For now, make its documentation less confusing, more correct, and
mark it as `@internal`, this is not a supported public interface.
Bug: T227297
Change-Id: I8902fe34b80c5152bfd37e9c24427ad48b5f4167
- * Get HTML for an info box with an icon.
+ * Get HTML for an information message box with an icon.
- * @param string $text Wikitext, get this with wfMessage()->plain()
+ * @internal For use by the WebInstaller class.
+ * @param string $rawHtml HTML
* @param string $icon Path to icon file (used as 'src' attribute)
* @param string $alt Alternate text for the icon
* @param string $class Additional class name to add to the wrapper div
* @param string $icon Path to icon file (used as 'src' attribute)
* @param string $alt Alternate text for the icon
* @param string $class Additional class name to add to the wrapper div
- static function infoBox( $text, $icon, $alt, $class = '' ) {
+ public static function infoBox( $rawHtml, $icon, $alt, $class = '' ) {
$s = self::openElement( 'div', [ 'class' => "mw-infobox $class" ] );
$s .= self::openElement( 'div', [ 'class' => 'mw-infobox-left' ] ) .
$s = self::openElement( 'div', [ 'class' => "mw-infobox $class" ] );
$s .= self::openElement( 'div', [ 'class' => 'mw-infobox-left' ] ) .
self::closeElement( 'div' );
$s .= self::openElement( 'div', [ 'class' => 'mw-infobox-right' ] ) .
self::closeElement( 'div' );
$s .= self::openElement( 'div', [ 'class' => 'mw-infobox-right' ] ) .
self::closeElement( 'div' );
$s .= self::element( 'div', [ 'style' => 'clear: left;' ], ' ' );
self::closeElement( 'div' );
$s .= self::element( 'div', [ 'style' => 'clear: left;' ], ' ' );
- * Get HTML for an info box with an icon.
+ * Get HTML for an information message box with an icon.
- * @param string $text Wikitext, get this with wfMessage()->plain()
+ * @param string $text Wikitext to be parsed (from Message::plain).
* @param string|bool $icon Icon name, file in mw-config/images. Default: false
* @param string|bool $class Additional class name to add to the wrapper div. Default: false.
* @param string|bool $icon Icon name, file in mw-config/images. Default: false
* @param string|bool $class Additional class name to add to the wrapper div. Default: false.
*/
public function getInfoBox( $text, $icon = false, $class = false ) {
*/
public function getInfoBox( $text, $icon = false, $class = false ) {
- $text = $this->parse( $text, true );
+ $html = $this->parse( $text, true );
$icon = ( $icon == false ) ?
'images/info-32.png' :
'images/' . $icon;
$alt = wfMessage( 'config-information' )->text();
$icon = ( $icon == false ) ?
'images/info-32.png' :
'images/' . $icon;
$alt = wfMessage( 'config-information' )->text();
- return Html::infoBox( $text, $icon, $alt, $class );
+ return Html::infoBox( $html, $icon, $alt, $class );