From: Jeroen De Dauw Date: Mon, 10 Oct 2011 21:05:02 +0000 (+0000) Subject: added shortcut method for commonly used method combination X-Git-Tag: 1.31.0-rc.0~27162 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=31098cc75936bf9dd5418ecc991c93363df4d76a;p=lhc%2Fweb%2Fwiklou.git added shortcut method for commonly used method combination --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 7041518e45..0dc7b0cc41 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1201,6 +1201,19 @@ class OutputPage extends ContextSource { public function addHTML( $text ) { $this->mBodytext .= $text; } + + /** + * Shortcut for adding an Html::element via addHTML. + * + * @since 1.19 + * + * @param $element string + * @param $attribs array + * @param $contents string + */ + public function addElement( $element, $attribs = array(), $contents = '' ) { + $this->addHTML( Html::element( $element, $attribs, $contents ) ); + } /** * Clear the body HTML