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. | |
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) TSDStandardOrganization::__construct | ( | $ | id = '' |
) |
Constructs new organization object.
$param $id [int]: ID of existing organization if this object is to be populated from the database
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 |
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 |
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.
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 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.
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 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