TSDStandardOrganization Class Reference
[Standards Hierarchy Objects]

Represents "Organization" in the TSD standard hierarchy. More...

Inheritance diagram for TSDStandardOrganization:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($id= '')
 Constructs new organization object.
 addGrade ($name)
 Creates a new TSDStandardGrade object that belongs to this organization.
 deleteGradeByName ($name)
 Removes all grade bands that have the given name.
 getIdentifier ()
 Returns string meant to be used when displaying the organization.
 getParent ()
 Retrieves parent object.
 isValid ()
 Returns whether organization object is valid to be in the database.
 listChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Retreives list of child (TSDStandardGrade) objects.
 listValidChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Retreives list of child (TSDStandardGrade) objects that have a full hierarchy beneath them.

Static Public Member Functions

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


Detailed Description

Represents "Organization" in the TSD standard hierarchy.

An organization provides a set of standards, usually for a particular state. An organization object contains zero or more grade bands, which themselves contain categories and further still, those categories contain objectives.

Attributes:

Definition at line 20 of file TSDStandardOrganization.php5.


Constructor & Destructor Documentation

TSDStandardOrganization::__construct ( id = ''  ) 

Constructs new organization object.

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

Definition at line 36 of file TSDStandardOrganization.php5.


Member Function Documentation

TSDStandardOrganization::addGrade ( name  ) 

Creates a new TSDStandardGrade object that belongs to this organization.

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

Parameters:
$name [string]: name of new grade band
Returns:
[TSDStandardGrade]: new TSDStandardGrade object, or null if there was an error

Definition at line 158 of file TSDStandardOrganization.php5.

References TSD::can(), TSDObject::checkInit(), TSDObject::commit(), and SObject::setError().

TSDStandardOrganization::deleteGradeByName ( name  ) 

Removes all grade bands that have the given name.

You must have the 'edit' permission to delete grade bands.

Parameters:
$name [string]: name of grade band(s) to delete
Returns:
[boolean]: success or failure

Definition at line 181 of file TSDStandardOrganization.php5.

References TSD::can(), TSDObject::checkInit(), and SObject::setError().

TSDStandardOrganization::getIdentifier (  ) 

Returns string meant to be used when displaying the organization.

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 98 of file TSDStandardOrganization.php5.

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

Retrieves list of TSDStandardOrganization objects according to constraints specified.

See Guide to Database Constraints for more about how to constraint the resultset. You can also request that the number of results be returned, rather than the results themselves.

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 TSDStandardOrganization objects, or an integer if $cnt is true, or null if there was an error

Definition at line 74 of file TSDStandardOrganization.php5.

TSDStandardOrganization::getParent (  ) 

Retrieves parent object.

For internal use only.

This method is not meaningful for an organization since it is at the top of the standards tree.

Returns:
[null]: null

Reimplemented from TSDObject.

Definition at line 87 of file TSDStandardOrganization.php5.

TSDStandardOrganization::isValid (  ) 

Returns whether organization object is valid to be in the database.

An organization is considered valid if it either has no ID (because it has not been created), or its id is a positive integer (not zero) and the name must be a non-empty string. The remaining fields (url, state, address and description) must either be strings, or empty/null.

Returns:
[boolean]: whether organization object is valid

Reimplemented from TSDObject.

Definition at line 48 of file TSDStandardOrganization.php5.

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

Retreives list of child (TSDStandardGrade) objects.

See Guide to Database Constraints for more about how to constraint the resultset. You can also request that the number of results be returned, rather than the results themselves.

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
Returns:
[array]: array of TSDStandardGrade objects that belong to this organization, or an integer with the number of objects that would be returned (if $cnt is true) or null if there was an error

Reimplemented from TSDObject.

Definition at line 118 of file TSDStandardOrganization.php5.

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

Retreives list of child (TSDStandardGrade) objects that have a full hierarchy beneath them.

See Guide to Database Constraints for more about how to constraint the resultset. You can also request that the number of results be returned, rather than the results themselves. Valid children are those subtrees (grades) that have children that are themselves valid. For a subtree to be completely valid, every leaf node must be an Objective. That is, there cannot be, say, Categories that have no Objectives.

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
Returns:
[array]: array of TSDStandardGrade objects that belong to this organization, or an integer with the number of objects that would be returned (if $cnt is true) or null if there was an error

Reimplemented from TSDObject.

Definition at line 142 of file TSDStandardOrganization.php5.


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

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