From 31098cc75936bf9dd5418ecc991c93363df4d76a Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Mon, 10 Oct 2011 21:05:02 +0000 Subject: [PATCH] added shortcut method for commonly used method combination --- includes/OutputPage.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.20.1