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. |
A category contains one or more objectives (TSDStandardObjective). The category has a name and it belongs to exactly one grade band (TSDStandardGrade). *
Attributes:
id
[int]: ID of grade (-)name
[string]: name of category (edit)gradeId
[int]: ID of grade this category belongs to (-) TSDStandardCategory::__construct | ( | $ | id = '' |
) |
Constructs new category object.
$id | [int]: ID of existing category if this object is to be populated from the database |
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
$description | [string]: description of new objective |
TSDStandardCategory::deleteObjectiveByDescription | ( | $ | description | ) |
Removes all objectives that have the given name.
You must have the 'edit' permission to delete objectives.
$description | [string]: description of objective(s) to delete |
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.
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
$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 TSDStandardCategory::getParent | ( | ) |
Retrieves parent grade band.
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.
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.
$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') |
$cnt
is true) or null if there was an error TSDStandardCategory::listValidChildren | ( | $ | constraints = array() , |
|
$ | limit = array() , |
|||
$ | order = array() , |
|||
$ | cnt = false | |||
) |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
$constraints | [TYPE]: DESCRIPTION | |
$limit | [TYPE]: DESCRIPTION | |
$order | [TYPE]: DESCRIPTION | |
$cnt | [TYPE]: DESCRIPTION |