
Public Member Functions | |
| __construct ($metadata, $params=array()) | |
| Constructor. | |
| render () | |
| Converts this component (and any children) to HTML. | |
Protected Member Functions | |
| formatValues ($key, $values) | |
| Convert to string (implode arrays with commas), show "none listed" if empty, or wrap in link if it's a URL. | |
| layoutMetadata () | |
| Add the TKTable displaying metadata field/value pairs to this object. | |
| mdRow ($tbl, $metadata, $key) | |
| Add one field/value row to the metadata table (display all values for one field). | |
| wrapLink ($link) | |
| Turn a URL string into an active link. | |
Definition at line 8 of file TKSDRResourceResultMetadata.php5.
| TKSDRResourceResultMetadata::__construct | ( | $ | metadata, | |
| $ | params = array() | |||
| ) |
Constructor.
| $metadata | [SDRResourceResultMetadata]: The metadata object to be viewed |
Definition at line 22 of file TKSDRResourceResultMetadata.php5.
| TKSDRResourceResultMetadata::formatValues | ( | $ | key, | |
| $ | values | |||
| ) | [protected] |
Convert to string (implode arrays with commas), show "none listed" if empty, or wrap in link if it's a URL.
This is used to generate the values part of the metadata field/values table.
| $key | [string]: The name of the key (so we can act on special types like Urls) | |
| $values | [mixed]: A value or list of values (strings) to be formatted |
Definition at line 62 of file TKSDRResourceResultMetadata.php5.
References wrapLink().
Referenced by mdRow().
| TKSDRResourceResultMetadata::mdRow | ( | $ | tbl, | |
| $ | metadata, | |||
| $ | key | |||
| ) | [protected] |
Add one field/value row to the metadata table (display all values for one field).
| $tbl | [TKTable]: The table onto which the row should be added | |
| $metadata | [SDRMetadataObj]: The object containing the metadata | |
| $key | [string]: The name of the metadata field |
Definition at line 100 of file TKSDRResourceResultMetadata.php5.
References formatValues().
Referenced by layoutMetadata().
| TKSDRResourceResultMetadata::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 106 of file TKSDRResourceResultMetadata.php5.
References layoutMetadata().
| TKSDRResourceResultMetadata::wrapLink | ( | $ | link | ) | [protected] |
Turn a URL string into an active link.
formatValues() calls this if the key is "Url" to make a link. If the class constant NEWTAB is true, the window will open in a new tab.
| $link | [string]: The URL |
Definition at line 86 of file TKSDRResourceResultMetadata.php5.
Referenced by formatValues().
1.5.6