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

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

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

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

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.

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.


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

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