Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct ( $diWikiPages, $diProperty, $limit, $from='', $until='') | |
getNavigationLinks (Title $title, $query=[]) | |
formatList ( $cutoff=6) | |
Static Public Member Functions | |
static | getRequestOptions ( $limit, $from, $until) |
static | getQuery (SMWDescription $description, $limit, $from, $until) |
static | getColumnList ( $start, $end, $diWikiPages, $diProperty, $moreCallback=null) |
static | getShortList ( $start, $end, $diWikiPages, $diProperty, $moreCallback=null) |
Protected Member Functions | |
makeSelfLink (Title $title, $linkText, array $parameters) | |
Protected Attributes | |
$mDiWikiPages | |
$mDiProperty | |
$mLimit | |
$mFrom | |
$mUntil | |
Helper class to generate HTML lists of wiki pages, with support for paged navigation using the from/until and limit settings as in MediaWiki's CategoryPage.
The class attempts to allow as much code as possible to be shared among different places where similar lists are used.
Some code adapted from CategoryPage.php
SMWPageLister::__construct | ( | $diWikiPages, | |
$diProperty, | |||
$limit, | |||
$from = '' , |
|||
$until = '' |
|||
) |
Constructor
$diWikiPages | array of SMWDIWikiPage |
$diProperty | mixed SMWDIProperty that the wikipages are values of, or null |
$limit | integer maximal amount of items to display |
$from | string if the results were selected starting from this string |
$until | string if the results were selected reaching until this string |
SMWPageLister::formatList | ( | $cutoff = 6 | ) |
Format a list of data items chunked by letter, either as a bullet list or a columnar format, depending on the length.
$cutoff | integer, use columns for more results than that |
|
static |
Format a list of SMWDIWikiPage objects chunked by letter in a three-column list, ordered vertically.
$start | integer |
$end | integer |
$diWikiPages | array of SMWDIWikiPage |
$diProperty | SMWDIProperty that the wikipages are values of, or null |
SMWPageLister::getNavigationLinks | ( | Title | $title, |
$query = [] |
|||
) |
Generates the prev/next link part to the HTML code of the top and bottom section of the page. Whether and how these links appear depends on specified boundaries, limit, and results. The title is required to create a link to the right page. The query array gives optional further parameters to append to all navigation links.
$title | Title |
$query | array that associates parameter names to parameter values |
|
static |
Make SMWQuery suitable for obtaining a list of results based on the given description, limit, and from or until string. One more result than the limit will be created, and the results may have to be reversed in order if $until is nonempty.
$description | SMWDescription main query description |
$limit | integer |
$from | string can be empty if no from condition is desired |
$until | string can be empty if no until condition is desired |
|
static |
Make SMWRequestOptions suitable for obtaining a list of results for the given limit, and from or until string. One more result than the limit will be created, and the results may have to be reversed in order if ascending is set to false in the resulting object.
$limit | integer |
$from | string can be empty if no from condition is desired |
$until | string can be empty if no until condition is desired |
|
static |
Format a list of diWikiPages chunked by letter in a bullet list.
$start | integer |
$end | integer |
$diWikiPages | array of SMWDataItem |
$diProperty | SMWDIProperty that the wikipages are values of, or null |
|
protected |
Format an HTML link with the given text and parameters.