* Shortcut for common use case
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 19 Apr 2008 13:51:01 +0000 (13:51 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 19 Apr 2008 13:51:01 +0000 (13:51 +0000)
includes/Xml.php

index 9d5233a..5bb64fe 100644 (file)
@@ -195,6 +195,10 @@ class Xml {
                return self::element( 'span', array( 'class' => $class ) + $attribs, $text );
        }
 
+       public static function wrapClass( $text, $class, $tag='span', $attribs=array() ) {
+               return self::tags( $tag, array( 'class' => $class ) + $attribs, $text );
+       }
+
        /**
         * Convenience function to build an HTML text input field
         * @return string HTML