Public Member Functions | |
| __construct (SMWQueryResult $queryResult, $outputmode, $linkAbsolute=false, $pageLinkText= '$1', $titleLinkSeparate=false) | |
| Constructor. | |
| setTemplate ($template) | |
| Sets the template. | |
| setIcon ($icon) | |
| Sets the global icon. | |
| setTitle ($title) | |
| Sets the global title. | |
| setText ($text) | |
| Sets the global text. | |
| setSubjectSeparator ($subjectSeparator) | |
| Sets the subject separator. | |
| setBoldSubject ($boldSubject) | |
| Sets if the subject should be made bold in the text. | |
| setShowSubject ($showSubject) | |
| Sets if the subject should shown in the text. | |
| setPageLinkText ($text) | |
| Sets the text for the link to the page when separate from the title. | |
| getLocations () | |
| Gets the query result as a list of locations. | |
Public Attributes | |
| $icon = '' | |
| $text = '' | |
| $title = '' | |
| $titleLinkSeparate | |
Protected Member Functions | |
| findLocations () | |
| Gets the query result as a list of locations. | |
| handleResultRow (array $row) | |
| Returns the locations found in the provided result row. | |
| handleResultSubject (SMWWikiPageValue $object) | |
| Handles a SMWWikiPageValue subject value. | |
| handleResultProperty (SMWDataValue $object, SMWPrintRequest $printRequest) | |
| Handles a single property (SMWPrintRequest) to be displayed for a record (SMWDataValue). | |
| buildLocationsList (array $locations, $title, $text, $icon, array $properties) | |
| Builds a set of locations with the provided title, text and icon. | |
| getLocationIcon (array $row) | |
| Get the icon for a row. | |
Protected Attributes | |
| $queryResult | |
| $outputmode | |
| $locations = false | |
| $template = false | |
| $linkAbsolute | |
| $pageLinkText | |
| $subjectSeparator = '<hr />' | |
| $boldSubject = true | |
| $showSubject = true | |
Definition at line 14 of file SM_QueryHandler.php.
| SMQueryHandler::__construct | ( | SMWQueryResult $ | queryResult, | |
| $ | outputmode, | |||
| $ | linkAbsolute = false, |
|||
| $ | pageLinkText = '$1', |
|||
| $ | titleLinkSeparate = false | |||
| ) |
Constructor.
| SMWQueryResult | $queryResult | |
| integer | $outputmode | |
| boolean | $linkAbsolute | |
| string | $pageLinkText | |
| boolean | $titleLinkSeparate |
Definition at line 122 of file SM_QueryHandler.php.
References $linkAbsolute, $outputmode, $pageLinkText, and $titleLinkSeparate.
| SMQueryHandler::setTemplate | ( | $ | template | ) |
Sets the template.
| string | $template |
Definition at line 138 of file SM_QueryHandler.php.
References $template.
| SMQueryHandler::setIcon | ( | $ | icon | ) |
Sets the global icon.
| string | $icon |
Definition at line 149 of file SM_QueryHandler.php.
References $icon.
| SMQueryHandler::setTitle | ( | $ | title | ) |
Sets the global title.
| string | $title |
Definition at line 160 of file SM_QueryHandler.php.
References $title.
| SMQueryHandler::setText | ( | $ | text | ) |
Sets the global text.
| string | $text |
Definition at line 171 of file SM_QueryHandler.php.
References $text, and simplejson::encoder::text.
| SMQueryHandler::setSubjectSeparator | ( | $ | subjectSeparator | ) |
Sets the subject separator.
| string | $subjectSeparator |
Definition at line 182 of file SM_QueryHandler.php.
References $subjectSeparator.
| SMQueryHandler::setBoldSubject | ( | $ | boldSubject | ) |
Sets if the subject should be made bold in the text.
| string | $boldSubject |
Definition at line 193 of file SM_QueryHandler.php.
References $boldSubject.
| SMQueryHandler::setShowSubject | ( | $ | showSubject | ) |
Sets if the subject should shown in the text.
| string | $showSubject |
Definition at line 204 of file SM_QueryHandler.php.
References $showSubject.
| SMQueryHandler::setPageLinkText | ( | $ | text | ) |
Sets the text for the link to the page when separate from the title.
| string | $text |
Definition at line 215 of file SM_QueryHandler.php.
References $text.
| SMQueryHandler::getLocations | ( | ) |
Gets the query result as a list of locations.
Definition at line 226 of file SM_QueryHandler.php.
References findLocations().
| SMQueryHandler::findLocations | ( | ) | [protected] |
Gets the query result as a list of locations.
Definition at line 241 of file SM_QueryHandler.php.
References $locations, and handleResultRow().
Referenced by getLocations().
| SMQueryHandler::handleResultRow | ( | array $ | row | ) | [protected] |
Returns the locations found in the provided result row.
| array | $row Array of SMWResultArray |
Definition at line 260 of file SM_QueryHandler.php.
References $icon, $locations, $text, $title, buildLocationsList(), getLocationIcon(), handleResultProperty(), handleResultSubject(), SMWPrintRequest::PRINT_PROP, and smwfGetLinker().
Referenced by findLocations().
| SMQueryHandler::handleResultSubject | ( | SMWWikiPageValue $ | object | ) | [protected] |
Handles a SMWWikiPageValue subject value.
Gets the plain text title and creates the HTML text with headers and the like.
| SMWWikiPageValue | $object |
Definition at line 315 of file SM_QueryHandler.php.
References $text, $title, SMWDataValue::getLongText(), SMWWikiPageValue::getTitle(), and smwfGetLinker().
Referenced by handleResultRow().
| SMQueryHandler::handleResultProperty | ( | SMWDataValue $ | object, | |
| SMWPrintRequest $ | printRequest | |||
| ) | [protected] |
Handles a single property (SMWPrintRequest) to be displayed for a record (SMWDataValue).
| SMWDataValue | $object | |
| SMWPrintRequest | $printRequest |
Definition at line 364 of file SM_QueryHandler.php.
References SMWPrintRequest::getHTMLText(), SMWDataValue::getLongText(), SMWDataValue::getTypeID(), and smwfGetLinker().
Referenced by handleResultRow().
| SMQueryHandler::buildLocationsList | ( | array $ | locations, | |
| $ | title, | |||
| $ | text, | |||
| $ | icon, | |||
| array $ | properties | |||
| ) | [protected] |
Builds a set of locations with the provided title, text and icon.
| array | of MapsLocation $locations | |
| string | $title | |
| string | $text | |
| string | $icon | |
| array | $properties |
Definition at line 432 of file SM_QueryHandler.php.
References $icon, $text, and $title.
Referenced by handleResultRow().
| SMQueryHandler::getLocationIcon | ( | array $ | row | ) | [protected] |
Get the icon for a row.
| array | $row |
Definition at line 470 of file SM_QueryHandler.php.
References $icon.
Referenced by handleResultRow().
SMQueryHandler::$queryResult [protected] |
Definition at line 16 of file SM_QueryHandler.php.
SMQueryHandler::$outputmode [protected] |
SMQueryHandler::$locations = false [protected] |
Definition at line 19 of file SM_QueryHandler.php.
Referenced by findLocations(), and handleResultRow().
SMQueryHandler::$template = false [protected] |
| SMQueryHandler::$icon = '' |
Definition at line 37 of file SM_QueryHandler.php.
Referenced by buildLocationsList(), getLocationIcon(), handleResultRow(), and setIcon().
| SMQueryHandler::$text = '' |
Definition at line 46 of file SM_QueryHandler.php.
Referenced by buildLocationsList(), handleResultRow(), handleResultSubject(), setPageLinkText(), and setText().
| SMQueryHandler::$title = '' |
Definition at line 55 of file SM_QueryHandler.php.
Referenced by buildLocationsList(), handleResultRow(), handleResultSubject(), and setTitle().
| SMQueryHandler::$titleLinkSeparate |
SMQueryHandler::$linkAbsolute [protected] |
SMQueryHandler::$pageLinkText [protected] |
SMQueryHandler::$subjectSeparator = '<hr />' [protected] |
SMQueryHandler::$boldSubject = true [protected] |
SMQueryHandler::$showSubject = true [protected] |
1.5.6