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. |
TKSDRResourceResultSet::__construct | ( | $ | result, | |
$ | params = array() | |||
) |
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().
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.
TKSDRResourceResultSet::layoutNextPrev | ( | ) |
TKSDRResourceResultSet::layoutResult | ( | $ | result, | |
$ | i | |||
) |
TKSDRResourceResultSet::layoutResults | ( | ) |
TKSDRResourceResultSet::layoutSearchBox | ( | ) |
TKSDRResourceResultSet::layoutStatsBox | ( | ) |
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.