OutputPage's addTemplate() is now a wrapper around QuickTemplate.
This allows more flexible usage of templated HTML, as
required by some third-party extensions.
Change-Id: I943e8e50438c716b7b56d2f908da38a4bf73d9e2
* @param $template QuickTemplate
*/
public function addTemplate( &$template ) {
- ob_start();
- $template->execute();
- $this->addHTML( ob_get_contents() );
- ob_end_clean();
+ $this->addHTML( $template->getHTML() );
}
/**
public function getSkin() {
return $this->data['skin'];
}
+
+ /**
+ * Fetch the output of a QuickTemplate and return it
+ *
+ * @since 1.23
+ * @return String
+ */
+ public function getHTML() {
+ ob_start();
+ $this->execute();
+ $html = ob_get_contents();
+ ob_end_clean();
+ return $html;
+ }
}
/**