SDRHelpers Class Reference

Provide helper functions for SDR UI. More...

Inheritance diagram for SDRHelpers:

Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static getRatingImageTag ($rating)
 Get an image tag based on the rating value (of a resource).
static getRatingText ($rating)
 Get a string based on the rating value (of a resource).
static getResourceFromSDR ($id)
 Get a resource by ID from the SDR service.
static parseArguments ($addArgs=null, $removeArgs=null)
static urlParser ($addArgs=null, $removeArgs=null)


Detailed Description

Provide helper functions for SDR UI.

Date:
9/3/10
Author:
valerie@shodor.org

Definition at line 8 of file SDRHelpers.php5.


Member Function Documentation

static SDRHelpers::getRatingImageTag ( rating  )  [static]

Get an image tag based on the rating value (of a resource).

Parameters:
$rating [int]: The numerical rating value (of a resource)
Returns:
[string]: The image tag showing the rating as stars, or text (Not Rated) if rating = 0

Definition at line 48 of file SDRHelpers.php5.

Referenced by TKCSERDClassicReviewSet::__construct(), TKSDRResourceResultSet::layoutResult(), and TKCSERDClassicReview::layoutReviewBox().

static SDRHelpers::getRatingText ( rating  )  [static]

Get a string based on the rating value (of a resource).

Parameters:
$rating [int]: The numerical rating value (of a resource)
Returns:
[string]: The string showing the rating, or (Not Rated) if rating = 0

Definition at line 60 of file SDRHelpers.php5.

Referenced by TKCSERDClassicReviewSet::__construct(), and TKSDRResourceResultSet::layoutResult().

static SDRHelpers::getResourceFromSDR ( id  )  [static]

Get a resource by ID from the SDR service.

Parameters:
$id [int]: The CSERD id of the object
Returns:
[SDRResourceResult]: The result from SDR

Definition at line 34 of file SDRHelpers.php5.

Referenced by TKCSERDClassicReviewSet::layoutReviewSet().

static SDRHelpers::parseArguments ( addArgs = null,
removeArgs = null 
) [static]

Handles arguments from the current url and creates an array, replacing them with new values that are passed in.

Definition at line 107 of file SDRHelpers.php5.

static SDRHelpers::urlParser ( addArgs = null,
removeArgs = null 
) [static]

Builds a new url from the current url and replaces arguments with new values that are passed in.

Definition at line 68 of file SDRHelpers.php5.

Referenced by TKSDRResourceResultSet::layoutNextPrev(), and TKSDRResourceResultSet::layoutSearchBox().


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

Generated on Wed Nov 24 02:05:59 2010 for Common by  doxygen 1.5.6