SMWPageLister Class Reference

List of all members.

Public Member Functions

 __construct (array $diWikiPages, $diProperty, $limit, $from= '', $until= '')
 Constructor.
 getNavigationLinks (Title $title, $query=array())
 Generates the prev/next link part to the HTML code of the top and bottom section of the page.
 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.

Static Public Member Functions

static getRequestOptions ($limit, $from, $until)
 Make SMWRequestOptions suitable for obtaining a list of results for the given limit, and from or until string.
static getQuery (SMWDescription $description, $limit, $from, $until)
 Make SMWQuery suitable for obtaining a list of results based on the given description, limit, and from or until string.
static getColumnList ($start, $end, array $diWikiPages, $diProperty)
 Format a list of SMWDIWikiPage objects chunked by letter in a three-column list, ordered vertically.
static getShortList ($start, $end, array $diWikiPages, $diProperty)
 Format a list of diWikiPages chunked by letter in a bullet list.

Protected Member Functions

 makeSelfLink (Title $title, $linkText, array $parameters)
 Format an HTML link with the given text and parameters.

Protected Attributes

 $mDiWikiPages
 $mDiProperty
 $mLimit
 $mFrom
 $mUntil


Detailed Description

Definition at line 20 of file SMW_PageLister.php.


Constructor & Destructor Documentation

SMWPageLister::__construct ( array $  diWikiPages,
diProperty,
limit,
from = '',
until = '' 
)

Constructor.

Parameters:
$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

Definition at line 37 of file SMW_PageLister.php.


Member Function Documentation

SMWPageLister::getNavigationLinks ( Title $  title,
query = array() 
)

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.

Parameters:
$title Title
$query array that associates parameter names to parameter values
Returns:
string

Definition at line 56 of file SMW_PageLister.php.

References makeSelfLink(), and smwfGetStore().

SMWPageLister::makeSelfLink ( Title $  title,
linkText,
array $  parameters 
) [protected]

Format an HTML link with the given text and parameters.

Returns:
string

Definition at line 102 of file SMW_PageLister.php.

References smwfGetLinker().

Referenced by getNavigationLinks().

static SMWPageLister::getRequestOptions ( limit,
from,
until 
) [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.

Parameters:
$limit integer
$from string can be empty if no from condition is desired
$until string can be empty if no until condition is desired
Returns:
SMWRequestOptions

Definition at line 117 of file SMW_PageLister.php.

Referenced by SMWPropertyPage::getPropertyValueList(), and SMWSpecialTypes::getTypeProperties().

static SMWPageLister::getQuery ( SMWDescription description,
limit,
from,
until 
) [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.

Parameters:
$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
Returns:
SMWQuery

Definition at line 147 of file SMW_PageLister.php.

References SMWDescription::addPrintRequest(), and SMWPrintRequest::PRINT_THIS.

Referenced by SMWConceptPage::getHtml().

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.

Parameters:
$cutoff integer, use columns for more results than that
Returns:
string

Definition at line 179 of file SMW_PageLister.php.

static SMWPageLister::getColumnList ( start,
end,
array $  diWikiPages,
diProperty 
) [static]

Format a list of SMWDIWikiPage objects chunked by letter in a three-column list, ordered vertically.

Parameters:
$start integer
$end integer
$diWikiPages array of SMWDIWikiPage
$diProperty SMWDIProperty that the wikipages are values of, or null
Returns:
string

Definition at line 210 of file SMW_PageLister.php.

References SMWDataValueFactory::newDataItemValue(), smwfGetLinker(), and smwfGetStore().

Referenced by SMWPropertyPage::getSubpropertyList().

static SMWPageLister::getShortList ( start,
end,
array $  diWikiPages,
diProperty 
) [static]

Format a list of diWikiPages chunked by letter in a bullet list.

Parameters:
$start integer
$end integer
$diWikiPages array of SMWDataItem
$diProperty SMWDIProperty that the wikipages are values of, or null
Returns:
string

Definition at line 279 of file SMW_PageLister.php.

References SMWDataValueFactory::newDataItemValue(), smwfGetLinker(), and smwfGetStore().

Referenced by SMWPropertyPage::getSubpropertyList().


Member Data Documentation

SMWPageLister::$mDiWikiPages [protected]

Definition at line 22 of file SMW_PageLister.php.

SMWPageLister::$mDiProperty [protected]

Definition at line 23 of file SMW_PageLister.php.

SMWPageLister::$mLimit [protected]

Definition at line 24 of file SMW_PageLister.php.

SMWPageLister::$mFrom [protected]

Definition at line 25 of file SMW_PageLister.php.

SMWPageLister::$mUntil [protected]

Definition at line 26 of file SMW_PageLister.php.


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6