Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SMW\ListResultPrinter Class Reference
Collaboration diagram for SMW\ListResultPrinter:
Collaboration graph
[legend]

Public Member Functions

 getName ()
 
 getParameters ()
 
- Public Member Functions inherited from SMW\ResultPrinter
 __construct ($format, $inline=true, $useValidator=false)
 
 isEnabledFeature ($feature)
 
 getQueryMode ($context)
 
 getName ()
 
 setShowErrors ($show)
 
 getParameters ()
 
 getParamDefinitions (array $definitions)
 
 getNamedParameters (array $definitions=array())
 
 isExportFormat ()
 
 getDefaultSort ()
 
- Public Member Functions inherited from SMW\QueryResultPrinter
 getResult (QueryResult $results, array $fullParams, $outputMode)
 

Protected Member Functions

 handleParameters (array $params, $outputmode)
 
 getResultText (SMWQueryResult $queryResult, $outputMode)
 
 initializePrintingParameters (SMWQueryResult $queryResult)
 
 getRowText (array $row, SMWQueryResult $res)
 
 getRowStart (SMWQueryResult $res)
 
 getRowListContent (array $row)
 
 addTemplateContentFields ($row)
 
 addCommonTemplateFields ($queryResult)
 
 getFurtherResultsText (SMWQueryResult $res, $outputMode)
 
 isPlainlist ()
 
- Protected Member Functions inherited from SMW\ResultPrinter
 getResultText (SMWQueryResult $res, $outputMode)
 
 buildResult (SMWQueryResult $results)
 
 handleParameters (array $params, $outputMode)
 
 postProcessParameters ()
 
 getLinker ($firstcol=false)
 
 getFurtherResultsLink (SMWQueryResult $res, $outputMode)
 
 getErrorString (SMWQueryResult $res)
 
 escapeText ($text, $outputmode)
 
 getSearchLabel ($outputmode)
 
 linkFurtherResults (SMWQueryResult $results)
 
 addError ($errorMessage)
 
 textDisplayParameters ()
 
 exportFormatParameters ()
 

Protected Attributes

 $mTemplate
 
 $mNamedArgs
 
 $mUserParam
 
 $mColumns
 
 $mIntroTemplate
 
 $mOutroTemplate
 
 $header
 
 $footer
 
 $rowstart
 
 $rowend
 
 $listsep
 
 $finallistsep
 
 $columnWidth
 
 $rowsPerColumn
 
 $numRowsInColumn
 
 $numRows
 
- Protected Attributes inherited from SMW\ResultPrinter
 $m_params
 
 $params
 
 $fullParams
 
 $outputMode
 
 $results
 
 $mIntro = ''
 
 $mOutro = ''
 
 $mSearchlabel = null
 
 $mDefault = ''
 
 $mFormat
 
 $mLinkFirst
 
 $mLinkOthers
 
 $mShowHeaders = SMW_HEADERS_SHOW
 
 $mShowErrors = true
 
 $mInline
 
 $mLinker
 
 $mErrors = array()
 
 $isHTML = false
 
 $hasTemplates = false
 

Additional Inherited Members

- Static Public Attributes inherited from SMW\ResultPrinter
static $maxRecursionDepth = 2
 

Detailed Description

Print query results in lists.

Author
Markus Krötzsch New implementation of SMW's printer for results in lists. The implementation covers comma-separated lists, ordered and unordered lists. List items may be formatted using templates, and list output can be in multiple columns (at least for ordered and unordered lists).

In the code below, one list item (with all extra information displayed for it) is called a "row", while one entry in this row is called a "field" to avoid confusion with the "columns" that we have in multi-column display. Every field may in turn contain many "values".

Member Function Documentation

SMW\ListResultPrinter::addCommonTemplateFields (   $queryResult)
protected
SMW\ListResultPrinter::addTemplateContentFields (   $row)
protected

Returns text for one result row, formatted as a template call.

Since
1.9
Parameters
$row
Returns
string
SMW\ListResultPrinter::getFurtherResultsText ( SMWQueryResult  $res,
  $outputMode 
)
protected

Get text for further results link. Used only during getResultText().

Since
1.9
Parameters
SMWQueryResult$res
integer$outputMode
Returns
string
SMW\ListResultPrinter::getName ( )
See also
SMW::getName

Implements SMW\QueryResultPrinter.

SMW\ListResultPrinter::getParameters ( )
SMW\ListResultPrinter::getResultText ( SMWQueryResult  $queryResult,
  $outputMode 
)
protected
See also
SMW::getResultText
Parameters
SMWQueryResult$queryResult
$outputMode
Returns
string
SMW\ListResultPrinter::getRowListContent ( array  $row)
protected

Returns text for one result row, formatted as a list.

Since
1.9
Todo:

The inner lists of values per field should use different separators.

Some spaces are hard-coded here; should probably be part of separators.

Bug:
Bad HTML tag escaping with hardcoded exceptions (for datatype _qty)
Parameters
SMWResultArray[]$row
Returns
string
SMW\ListResultPrinter::getRowStart ( SMWQueryResult  $res)
protected

Returns row start element

Since
1.9
Parameters
SMWQueryResult$res
Returns
string
SMW\ListResultPrinter::getRowText ( array  $row,
SMWQueryResult  $res 
)
protected

Get result text for one result row as part of getResultText().

Since
1.9
Parameters
SMWResultArray[]$row
SMWQueryResult$res
Returns
string
SMW\ListResultPrinter::handleParameters ( array  $params,
  $outputmode 
)
protected
See also
SMWResultPrinter::handleParameters
Since
1.6
Parameters
array$params
$outputmode
SMW\ListResultPrinter::initializePrintingParameters ( SMWQueryResult  $queryResult)
protected

Initialize the internal parameters that should be used to print this list, and reset row counters.

Since
1.9
Parameters
SMWQueryResult$queryResult
SMW\ListResultPrinter::isPlainlist ( )
protected

Member Data Documentation

SMW\ListResultPrinter::$columnWidth
protected
SMW\ListResultPrinter::$finallistsep
protected
SMW\ListResultPrinter::$footer
protected
SMW\ListResultPrinter::$header
protected
SMW\ListResultPrinter::$listsep
protected
SMW\ListResultPrinter::$mColumns
protected
SMW\ListResultPrinter::$mIntroTemplate
protected
SMW\ListResultPrinter::$mNamedArgs
protected
SMW\ListResultPrinter::$mOutroTemplate
protected
SMW\ListResultPrinter::$mTemplate
protected
SMW\ListResultPrinter::$mUserParam
protected
SMW\ListResultPrinter::$numRows
protected
SMW\ListResultPrinter::$numRowsInColumn
protected
SMW\ListResultPrinter::$rowend
protected
SMW\ListResultPrinter::$rowsPerColumn
protected
SMW\ListResultPrinter::$rowstart
protected

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