
Public Member Functions | |
| __construct ($result, $params=array()) | |
| Create a TK object that displays a resource result set. | |
| bufferContributorIcons () | |
| Look up the list of contributor icons and store their paths in $contributorIcons. | |
| contributorIconForURL ($url) | |
| Return a contributor icon that matches this item's URL (or no icon if no match). | |
| layoutNextPrev () | |
| Return a table containing next/previous arrows to be shown with this result. | |
| layoutPage () | |
| Call layout of all subcomponents, and add relevant ones to this component. | |
| layoutResult ($result, $i) | |
| Return a nullbox viewing one resource result. | |
| layoutResults () | |
| Return a table containing the list of resource results. | |
| layoutSearchBox () | |
| Return a table allowing the user to revise the search by posting a new search string. | |
| layoutStatsBox () | |
| Return a table showing stats about the search (total num results, current range). | |
| render () | |
| Converts this component (and any children) to HTML. | |
Definition at line 8 of file TKSDRResourceResultSet.php5.
| TKSDRResourceResultSet::__construct | ( | $ | result, | |
| $ | params = array() | |||
| ) |
Create a TK object that displays a resource result set.
| $result | [SDRServiceResult]: A result object generated by querying the SDR service using XSI (or a subclass of XSI) | |
| $params | [array]: Additional information about how to display this result set |
Definition at line 49 of file TKSDRResourceResultSet.php5.
| TKSDRResourceResultSet::bufferContributorIcons | ( | ) |
Look up the list of contributor icons and store their paths in $contributorIcons.
Look up the list of contributor icons in the file system (at the path specified by SConfig option hpcu.contributors). Icons are stored as <domainname.jpg>. Read in a list of these domain names and push them onto the contributorIcons array for use by contributorIconForURL().
Definition at line 314 of file TKSDRResourceResultSet.php5.
References SnapDirectory::lookup().
Referenced by layoutPage().
| TKSDRResourceResultSet::contributorIconForURL | ( | $ | url | ) |
Return a contributor icon that matches this item's URL (or no icon if no match).
For a given URL, look to see if any of the contributorIcons (named by the domain name of the contributor's website) match part of this URL. If so, format a floating box containing that contributor's icon for display on the page next to the projectContext badge.
Definition at line 334 of file TKSDRResourceResultSet.php5.
Referenced by layoutResult().
| TKSDRResourceResultSet::layoutNextPrev | ( | ) |
Return a table containing next/previous arrows to be shown with this result.
Definition at line 266 of file TKSDRResourceResultSet.php5.
References SDRHelpers::urlParser().
Referenced by layoutPage().
| TKSDRResourceResultSet::layoutResult | ( | $ | result, | |
| $ | i | |||
| ) |
Return a nullbox viewing one resource result.
Definition at line 96 of file TKSDRResourceResultSet.php5.
References contributorIconForURL(), SDRHelpers::getRatingImageTag(), and SDRHelpers::getRatingText().
Referenced by layoutResults().
| TKSDRResourceResultSet::layoutResults | ( | ) |
Return a table containing the list of resource results.
Definition at line 64 of file TKSDRResourceResultSet.php5.
References layoutResult().
Referenced by layoutPage().
| TKSDRResourceResultSet::layoutSearchBox | ( | ) |
Return a table allowing the user to revise the search by posting a new search string.
Definition at line 202 of file TKSDRResourceResultSet.php5.
References SDRHelpers::urlParser().
Referenced by layoutPage().
| TKSDRResourceResultSet::layoutStatsBox | ( | ) |
Return a table showing stats about the search (total num results, current range).
Definition at line 177 of file TKSDRResourceResultSet.php5.
| TKSDRResourceResultSet::render | ( | ) |
Converts this component (and any children) to HTML.
This will only actually generate the HTML once. If render() has been called before, this will only return the results of the previous render operation.
Reimplemented from TKComponent.
Definition at line 356 of file TKSDRResourceResultSet.php5.
References layoutPage().
1.5.6