Public Member Functions | |
| getName () | |
| Get a human readable label for this printer. | |
| getResult (SMWQueryResult $results, array $params, $outputmode) | |
| Main entry point: takes an SMWQueryResult and parameters given as key-value-pairs in an array, and returns the serialised version of the results, formatted as HTML or Wiki or whatever is specified. | |
| getResultText (SMWQueryResult $results, $outputmode) | |
| Return serialised results in specified format. | |
| getParameters () | |
Protected Member Functions | |
| addImageProperties (SMWQueryResult $results, ImageGallery &$ig, $imageProperty, $captionProperty) | |
| Handles queries where the images (and optionally their captions) are specified as properties. | |
| addImagePages (SMWQueryResult $results, ImageGallery &$ig) | |
| Handles queries where the result objects are image pages. | |
| addImageToGallery (ImageGallery &$ig, Title $imgTitle, $imgCaption) | |
| Adds a single image to the gallery. | |
Definition at line 13 of file SRF_Gallery.php.
| SRFGallery::getName | ( | ) |
Get a human readable label for this printer.
The default is to return just the format identifier. Concrete implementations may refer to messages here. The format name is normally not used in wiki text but only in forms etc. hence the user language should be used when retrieving messages.
Reimplemented from SMWResultPrinter.
Definition at line 15 of file SRF_Gallery.php.
| SRFGallery::getResult | ( | SMWQueryResult $ | results, | |
| array $ | params, | |||
| $ | outputmode | |||
| ) |
Main entry point: takes an SMWQueryResult and parameters given as key-value-pairs in an array, and returns the serialised version of the results, formatted as HTML or Wiki or whatever is specified.
Normally this is not overwritten by subclasses.
If the outputmode is SMW_OUTPUT_WIKI, then the function will return something that is suitable for being used in a MediaWiki parser function, i.e. a wikitext strong *or* an array with flags and the string as entry 0. See Parser::setFunctionHook() for documentation on this. In all other cases, the function returns just a string.
For outputs SMW_OUTPUT_WIKI and SMW_OUTPUT_HTML, error messages or standard "further results" links are directly generated and appended. For SMW_OUTPUT_FILE, only the plain generated text is returned.
| $results | SMWQueryResult | |
| $params | array | |
| $outputmode | integer |
Reimplemented from SMWResultPrinter.
Definition at line 19 of file SRF_Gallery.php.
References getResultText(), and SMWResultPrinter::handleParameters().
| SRFGallery::getResultText | ( | SMWQueryResult $ | res, | |
| $ | outputmode | |||
| ) |
Return serialised results in specified format.
Implemented by subclasses.
Reimplemented from SMWResultPrinter.
Definition at line 25 of file SRF_Gallery.php.
References addImagePages(), addImageProperties(), and SMWOutputs::requireResource().
Referenced by getResult().
| SRFGallery::addImageProperties | ( | SMWQueryResult $ | results, | |
| ImageGallery &$ | ig, | |||
| $ | imageProperty, | |||
| $ | captionProperty | |||
| ) | [protected] |
Handles queries where the images (and optionally their captions) are specified as properties.
| SMWQueryResult | $results | |
| ImageGallery | $ig | |
| string | $imageProperty | |
| string | $captionProperty |
Definition at line 107 of file SRF_Gallery.php.
References addImageToGallery(), and SMWResultPrinter::getLinker().
Referenced by getResultText().
| SRFGallery::addImagePages | ( | SMWQueryResult $ | results, | |
| ImageGallery &$ | ig | |||
| ) | [protected] |
Handles queries where the result objects are image pages.
| SMWQueryResult | $results | |
| ImageGallery | $ig |
Definition at line 147 of file SRF_Gallery.php.
References addImageToGallery(), and SMWResultPrinter::getLinker().
Referenced by getResultText().
| SRFGallery::addImageToGallery | ( | ImageGallery &$ | ig, | |
| Title $ | imgTitle, | |||
| $ | imgCaption | |||
| ) | [protected] |
Adds a single image to the gallery.
Takes care of automatically adding a caption when none is provided and parsing it's wikitext.
| ImageGallery | $ig The gallery to add the image to | |
| Title | $imgTitle The title object of the page of the image | |
| string | $imgCaption An optional caption for the image |
Definition at line 179 of file SRF_Gallery.php.
Referenced by addImagePages(), and addImageProperties().
| SRFGallery::getParameters | ( | ) |
Reimplemented from SMWResultPrinter.
Definition at line 216 of file SRF_Gallery.php.
References SMWResultPrinter::$params.
1.5.6