From: Niklas Laxström Date: Sat, 19 Apr 2008 13:51:01 +0000 (+0000) Subject: * Shortcut for common use case X-Git-Tag: 1.31.0-rc.0~48185 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=cab3560abcf49bd17f9aef7dccfd4036c777dd9c;p=lhc%2Fweb%2Fwiklou.git * Shortcut for common use case --- diff --git a/includes/Xml.php b/includes/Xml.php index 9d5233a7e9..5bb64fe6ab 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -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