Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php |
— | — | @@ -16,6 +16,11 @@ |
17 | 17 | * This function creates wiki text suitable for rendering a Factbox for a given |
18 | 18 | * SMWSemanticData object that holds all relevant data. It also checks whether the |
19 | 19 | * given setting of $showfactbox requires displaying the given data at all. |
| 20 | + * |
| 21 | + * @param SMWSemanticData $semdata |
| 22 | + * @param boolean $showfactbox |
| 23 | + * |
| 24 | + * @return string |
20 | 25 | */ |
21 | 26 | static public function getFactboxText( SMWSemanticData $semdata, $showfactbox = SMW_FACTBOX_NONEMPTY ) { |
22 | 27 | global $wgContLang; |
— | — | @@ -106,8 +111,13 @@ |
107 | 112 | * information found in a given ParserOutput object. If the required custom data |
108 | 113 | * is not found in the given ParserOutput, then semantic data for the provided Title |
109 | 114 | * object is retreived from the store. |
| 115 | + * |
| 116 | + * @param ParserOutput $parseroutput |
| 117 | + * @param Title $title |
| 118 | + * |
| 119 | + * @return string |
110 | 120 | */ |
111 | | - static public function getFactboxTextFromOutput( $parseroutput, $title ) { |
| 121 | + static public function getFactboxTextFromOutput( ParserOutput $parseroutput, Title $title ) { |
112 | 122 | global $wgRequest, $smwgShowFactboxEdit, $smwgShowFactbox; |
113 | 123 | $mws = ( isset( $parseroutput->mSMWMagicWords ) ) ? $parseroutput->mSMWMagicWords : array(); |
114 | 124 | if ( in_array( 'SMW_SHOWFACTBOX', $mws ) ) { |
— | — | @@ -136,8 +146,13 @@ |
137 | 147 | * This hook copies SMW's custom data from the given ParserOutput object to |
138 | 148 | * the given OutputPage object, since otherwise it is not possible to access |
139 | 149 | * it later on to build a Factbox. |
| 150 | + * |
| 151 | + * @param OutputPage $outputpage |
| 152 | + * @param ParserOutput $parseroutput |
| 153 | + * |
| 154 | + * @return true |
140 | 155 | */ |
141 | | - static public function onOutputPageParserOutput( $outputpage, $parseroutput ) { |
| 156 | + static public function onOutputPageParserOutput( OutputPage $outputpage, ParserOutput $parseroutput ) { |
142 | 157 | global $wgTitle, $wgParser; |
143 | 158 | $factbox = SMWFactbox::getFactboxTextFromOutput( $parseroutput, $wgTitle ); |
144 | 159 | |
— | — | @@ -155,8 +170,13 @@ |
156 | 171 | |
157 | 172 | /** |
158 | 173 | * This hook is used for inserting the Factbox text directly after the wiki page. |
| 174 | + * |
| 175 | + * @param OutputPage $outputpage |
| 176 | + * @param string $text |
| 177 | + * |
| 178 | + * @return true |
159 | 179 | */ |
160 | | - static public function onOutputPageBeforeHTML( $outputpage, &$text ) { |
| 180 | + static public function onOutputPageBeforeHTML( OutputPage $outputpage, &$text ) { |
161 | 181 | if ( isset( $outputpage->mSMWFactboxText ) ) { |
162 | 182 | $text .= $outputpage->mSMWFactboxText; |
163 | 183 | } |
— | — | @@ -166,8 +186,13 @@ |
167 | 187 | /** |
168 | 188 | * This hook is used for inserting the Factbox text after the article contents (including |
169 | 189 | * categories). |
| 190 | + * |
| 191 | + * @param string $data |
| 192 | + * @param Skin|null $skin |
| 193 | + * |
| 194 | + * @return true |
170 | 195 | */ |
171 | | - static public function onSkinAfterContent( &$data, $skin = null ) { |
| 196 | + static public function onSkinAfterContent( &$data, Skin $skin = null ) { |
172 | 197 | global $wgOut; |
173 | 198 | if ( isset( $wgOut->mSMWFactboxText ) ) { |
174 | 199 | $data .= $wgOut->mSMWFactboxText; |