
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. | |
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:
id [int]: ID of organization (-)name [string]: name of organization (edit)url [string]: URL for organization, if any (edit)state [string]: state that organization belongs to (edit)address [string]: street address of organization (edit)description [string]: description of organization (edit) Definition at line 20 of file TSDStandardOrganization.php5.
| 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.
| 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
| $name | [string]: name of new grade band |
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.
| $name | [string]: name of grade band(s) to delete |
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.
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.
| $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 |
$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.
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.
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.
| $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 |
$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.
| $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 |
$cnt is true) or null if there was an error Reimplemented from TSDObject.
Definition at line 142 of file TSDStandardOrganization.php5.
1.5.6