https://www.mediawiki.org/wiki/Special:Code/MediaWiki/104571
Revision: 104571 Author: jeroendedauw Date: 2011-11-29 16:05:00 +0000 (Tue, 29 Nov 2011) Log Message: ----------- docs++ Modified Paths: -------------- trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php =================================================================== --- trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php 2011-11-29 15:55:46 UTC (rev 104570) +++ trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php 2011-11-29 16:05:00 UTC (rev 104571) @@ -16,6 +16,11 @@ * This function creates wiki text suitable for rendering a Factbox for a given * SMWSemanticData object that holds all relevant data. It also checks whether the * given setting of $showfactbox requires displaying the given data at all. + * + * @param SMWSemanticData $semdata + * @param boolean $showfactbox + * + * @return string */ static public function getFactboxText( SMWSemanticData $semdata, $showfactbox = SMW_FACTBOX_NONEMPTY ) { global $wgContLang; @@ -106,8 +111,13 @@ * information found in a given ParserOutput object. If the required custom data * is not found in the given ParserOutput, then semantic data for the provided Title * object is retreived from the store. + * + * @param ParserOutput $parseroutput + * @param Title $title + * + * @return string */ - static public function getFactboxTextFromOutput( $parseroutput, $title ) { + static public function getFactboxTextFromOutput( ParserOutput $parseroutput, Title $title ) { global $wgRequest, $smwgShowFactboxEdit, $smwgShowFactbox; $mws = ( isset( $parseroutput->mSMWMagicWords ) ) ? $parseroutput->mSMWMagicWords : array(); if ( in_array( 'SMW_SHOWFACTBOX', $mws ) ) { @@ -136,8 +146,13 @@ * This hook copies SMW's custom data from the given ParserOutput object to * the given OutputPage object, since otherwise it is not possible to access * it later on to build a Factbox. + * + * @param OutputPage $outputpage + * @param ParserOutput $parseroutput + * + * @return true */ - static public function onOutputPageParserOutput( $outputpage, $parseroutput ) { + static public function onOutputPageParserOutput( OutputPage $outputpage, ParserOutput $parseroutput ) { global $wgTitle, $wgParser; $factbox = SMWFactbox::getFactboxTextFromOutput( $parseroutput, $wgTitle ); @@ -155,8 +170,13 @@ /** * This hook is used for inserting the Factbox text directly after the wiki page. + * + * @param OutputPage $outputpage + * @param string $text + * + * @return true */ - static public function onOutputPageBeforeHTML( $outputpage, &$text ) { + static public function onOutputPageBeforeHTML( OutputPage $outputpage, &$text ) { if ( isset( $outputpage->mSMWFactboxText ) ) { $text .= $outputpage->mSMWFactboxText; } @@ -166,8 +186,13 @@ /** * This hook is used for inserting the Factbox text after the article contents (including * categories). + * + * @param string $data + * @param Skin|null $skin + * + * @return true */ - static public function onSkinAfterContent( &$data, $skin = null ) { + static public function onSkinAfterContent( &$data, Skin $skin = null ) { global $wgOut; if ( isset( $wgOut->mSMWFactboxText ) ) { $data .= $wgOut->mSMWFactboxText; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs