X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FHtml.php;h=ea2ce07a32976d1c9468573e69316b3f085ddd36;hp=c4b57af9788e68b487f6791b43114823d93b5ae9;hb=9c7f6734c397a954b8eaa5ec73876f2b4bf92afb;hpb=22ac82f4cd7960735339d23865fce21665ea9c17 diff --git a/includes/Html.php b/includes/Html.php index c4b57af978..ea2ce07a32 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -704,7 +704,7 @@ class Html { * Return the HTML for a message box. * @since 1.31 * @param string $html of contents of box - * @param string $className corresponding to box + * @param string|array $className corresponding to box * @param string $heading (optional) * @return string of HTML representing a box. */ @@ -718,32 +718,38 @@ class Html { /** * Return a warning box. * @since 1.31 + * @since 1.34 $className optional parameter added * @param string $html of contents of box + * @param string $className (optional) corresponding to box * @return string of HTML representing a warning box. */ - public static function warningBox( $html ) { - return self::messageBox( $html, 'warningbox' ); + public static function warningBox( $html, $className = '' ) { + return self::messageBox( $html, [ 'warningbox', $className ] ); } /** * Return an error box. * @since 1.31 + * @since 1.34 $className optional parameter added * @param string $html of contents of error box * @param string $heading (optional) + * @param string $className (optional) corresponding to box * @return string of HTML representing an error box. */ - public static function errorBox( $html, $heading = '' ) { - return self::messageBox( $html, 'errorbox', $heading ); + public static function errorBox( $html, $heading = '', $className = '' ) { + return self::messageBox( $html, [ 'errorbox', $className ], $heading ); } /** * Return a success box. * @since 1.31 + * @since 1.34 $className optional parameter added * @param string $html of contents of box + * @param string $className (optional) corresponding to box * @return string of HTML representing a success box. */ - public static function successBox( $html ) { - return self::messageBox( $html, 'successbox' ); + public static function successBox( $html, $className = '' ) { + return self::messageBox( $html, [ 'successbox', $className ] ); } /** @@ -1005,7 +1011,7 @@ class Html { /** * Get HTML for an information message box with an icon. * - * @internal For use by the WebInstaller class. + * @internal For use by the WebInstaller class only. * @param string $rawHtml HTML * @param string $icon Path to icon file (used as 'src' attribute) * @param string $alt Alternate text for the icon