Public Member Functions | |
__construct ($id= '') | |
Constructs new grade object. | |
addCategory ($name) | |
Creates a new TSDStandardCategory object that belongs to this grade. | |
deleteCategoryByName ($name) | |
Removes all categories that have the given name. | |
getIdentifier () | |
Returns string meant to be used when displaying the grade band. | |
getParent () | |
Retrieves parent organization. | |
isValid () | |
Returns whether grade is valid to be in the database. | |
listChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false) | |
Retrieves list of child (TSDStandardCategory) objects. | |
listValidChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false) | |
Retreives list of child (TSDStandardCategory) 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 TSDStandardGrade objects according to constraints specified. |
A grade band contains one or more categories (TSDStandardCategory). The grade band has a name and it belongs to exactly one organization (TSDStandardOrganization). The categories contain objectives, which are the leaves of the standards hierarchy.
Attributes:
id
[int]: ID of grade (-)name
[string]: name of grade (edit)organizationId
[int]: ID of organization this grade belongs to (-) TSDStandardGrade::__construct | ( | $ | id = '' |
) |
Constructs new grade object.
$id | [int]: ID of existing grade band if this object is to be populated from the database |
TSDStandardGrade::addCategory | ( | $ | name | ) |
Creates a new TSDStandardCategory object that belongs to this grade.
You must have the 'edit' permission to be able to create new category objects
$name | [string]: name of new category |
TSDStandardGrade::deleteCategoryByName | ( | $ | name | ) |
Removes all categories that have the given name.
You must have the 'edit' permission to delete categories.
$name | [string]: name of category(ies) to delete |
TSDStandardGrade::getIdentifier | ( | ) |
Returns string meant to be used when displaying the grade band.
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 TSDStandardGrade::getList | ( | $ | constraints = array() , |
|
$ | limit = array() , |
|||
$ | order = array() , |
|||
$ | cnt = false | |||
) | [static] |
Retrieves list of TSDStandardGrade 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 TSDStandardGrade::getParent | ( | ) |
Retrieves parent organization.
TSDStandardGrade::isValid | ( | ) |
Returns whether grade is valid to be in the database.
A grade 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 organization ID.
TSDStandardGrade::listChildren | ( | $ | constraints = array() , |
|
$ | limit = array() , |
|||
$ | order = array() , |
|||
$ | cnt = false | |||
) |
Retrieves list of child (TSDStandardCategory) 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 TSDStandardGrade::listValidChildren | ( | $ | constraints = array() , |
|
$ | limit = array() , |
|||
$ | order = array() , |
|||
$ | cnt = false | |||
) |
Retreives list of child (TSDStandardCategory) 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 (categories) 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