TSDStandardCategory Class Reference
[Standards Hierarchy Objects]

Represents category in TSD standards hierarchy. More...

Inheritance diagram for TSDStandardCategory:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($id= '')
 Constructs new category object.
 addObjective ($description)
 Creates a new TSDStandardObjective object that belongs to this category.
 deleteObjectiveByDescription ($description)
 Removes all objectives that have the given name.
 getIdentifier ()
 Returns string meant to be used when displaying the category.
 getParent ()
 Retrieves parent grade band.
 isValid ()
 Returns whether category is valid to be in the database.
 listChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false, $withAlCnt=false)
 Retrieves list of child (TSDStandardObjective) objects.
 listValidChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 INSERT BRIEF DESCRIPTION HERE.

Static Public Member Functions

static getList ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Retrieves list of TSDStandardCategory objects according to constraints specified.


Detailed Description

Represents category in TSD standards hierarchy.

A category contains one or more objectives (TSDStandardObjective). The category has a name and it belongs to exactly one grade band (TSDStandardGrade). *

Attributes:

Definition at line 16 of file TSDStandardCategory.php5.


Constructor & Destructor Documentation

TSDStandardCategory::__construct ( id = ''  ) 

Constructs new category object.

Parameters:
$id [int]: ID of existing category if this object is to be populated from the database

Definition at line 29 of file TSDStandardCategory.php5.


Member Function Documentation

TSDStandardCategory::addObjective ( description  ) 

Creates a new TSDStandardObjective object that belongs to this category.

You must have the 'edit' permission to be able to create new objective objects

Parameters:
$description [string]: description of new objective
Returns:
[TSDStandardObjective]: new TSDStandardObjective object, or null if there was an error

Definition at line 148 of file TSDStandardCategory.php5.

TSDStandardCategory::deleteObjectiveByDescription ( description  ) 

Removes all objectives that have the given name.

You must have the 'edit' permission to delete objectives.

Parameters:
$description [string]: description of objective(s) to delete
Returns:
[boolean]: success or failure

Definition at line 171 of file TSDStandardCategory.php5.

TSDStandardCategory::getIdentifier (  ) 

Returns string meant to be used when displaying the category.

This string is not guaranteed to be unique, but is considered to be a good enough display name. Currently, it is simply the value of the 'name' field.

Returns:
[string]: display string

Reimplemented from TSDObject.

Definition at line 89 of file TSDStandardCategory.php5.

static TSDStandardCategory::getList ( constraints = array(),
limit = array(),
order = array(),
cnt = false 
) [static]

Retrieves list of TSDStandardCategory objects according to constraints specified.

See the Guide to Database Constraints for more information how to construct constraints

Parameters:
$constraints [array]: resultset constraints
$limit [array]: limit the number of results
$order [array]: how the results are ordered
$cnt [boolean]: if true, just returns a count of how many objects would be returned, otherwise, actually returns array of objects
Returns:
[array]: array of TSDStandardCategory objects, or an integer if $cnt is true, or null if there was an error

Definition at line 61 of file TSDStandardCategory.php5.

TSDStandardCategory::getParent (  ) 

Retrieves parent grade band.

Returns:
[TSDStandardGrade]: grade band that contains this category, or null on error

Reimplemented from TSDObject.

Definition at line 72 of file TSDStandardCategory.php5.

References TSDObject::checkInit(), and isValid().

TSDStandardCategory::isValid (  ) 

Returns whether category is valid to be in the database.

A category is valid if it has an empty ID, or a >0 numeric ID. It must also have a non-empty string name an a >0 numeric grade band ID.

Returns:
[boolean]: whether category is valid according to above criteria

Reimplemented from TSDObject.

Definition at line 41 of file TSDStandardCategory.php5.

Referenced by getParent().

TSDStandardCategory::listChildren ( constraints = array(),
limit = array(),
order = array(),
cnt = false,
withAlCnt = false 
)

Retrieves list of child (TSDStandardObjective) objects.

See the Guide to Database Constraints for more information on how to build constraint arrays.

Parameters:
$constraints [array]: constraint resultset
$limit [array]: limit the number of results returned
$order [array]: how the results are ordered
$cnt [boolean]: if true, return the number of result objects that would be returned; if false, return the objects in an array
$withAlCnt [boolean]: if true, also include a field in each result object that indicates how many alignments there are (field will be called 'numAlignments')
Returns:
[array]: array of TSDStandardObjective objects that belong to this category, or an integer with the number of objects that would be returned (if $cnt is true) or null if there was an error

Definition at line 108 of file TSDStandardCategory.php5.

References SConfig::getDefault().

TSDStandardCategory::listValidChildren ( constraints = array(),
limit = array(),
order = array(),
cnt = false 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$constraints [TYPE]: DESCRIPTION
$limit [TYPE]: DESCRIPTION
$order [TYPE]: DESCRIPTION
$cnt [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from TSDObject.

Definition at line 137 of file TSDStandardCategory.php5.


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

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