
Public Member Functions | |
| __construct ($id= '') | |
| Initializes new Chapter object. | |
| addSection ($name, $description= '') | |
| Creates a new section in this chapter. | |
| deleteSectionByName ($name) | |
| Deletes any child sections with given name. | |
| getIdentifier () | |
| Returns a string that identifies this chapter. | |
| getParent () | |
| Retrieves the book object to which this chapter belongs. | |
| isValid () | |
| Determines whether chapter is valid to be in the database. | |
| listChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false, $withAlCnt=false) | |
| Returns a list of all sections contained in this chapter, constrained by given criteria. | |
| 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) |
| Returns a list of all chapters, constrained by given criteria. | |
A chapter contains one or more sections. It belongs to one and only one book. This class has methods for creating, destroying and querying chapters.
Attributes:
id [int]: ID of chapter (-)name [string]: name of chapter (edit)bookId [int]: ID of book to which this chapter belogs (-) Definition at line 16 of file TSDChapter.php5.
| TSDChapter::__construct | ( | $ | id = '' |
) |
Initializes new Chapter object.
If $id is provided, then an attempt is made to populate this object from the database using that ID. Otherwise, an empty object is created, which can be filled with new data to be committed later. You cannot populate after creating the object.
| $id | [int]: ID of chapter in database to populate from |
Definition at line 32 of file TSDChapter.php5.
| TSDChapter::addSection | ( | $ | name, | |
| $ | description = '' | |||
| ) |
Creates a new section in this chapter.
You must have the edit permission to add new chapters.
| $name | [string]: name of section | |
| $description | [string]: optional description for section |
Definition at line 162 of file TSDChapter.php5.
| TSDChapter::deleteSectionByName | ( | $ | name | ) |
Deletes any child sections with given name.
This will only delete sections that belong to this book and only if the name matches exactly (but case insensitive).
| $name | [string]: name of section(s) to delete |
Definition at line 188 of file TSDChapter.php5.
| TSDChapter::getIdentifier | ( | ) |
Returns a string that identifies this chapter.
The identifier string is not meant to uniquely identify the chapter, but rather for use for display purposes. For chapters, the identifier is simply the name of the chapter.
Reimplemented from TSDObject.
Definition at line 149 of file TSDChapter.php5.
| static TSDChapter::getList | ( | $ | constraints = array(), |
|
| $ | limit = array(), |
|||
| $ | order = array(), |
|||
| $ | cnt = false | |||
| ) | [static] |
Returns a list of all chapters, constrained by given criteria.
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]: additional constraints on the result set | |
| $limit | [array]: parameters for the LIMIT clause of the query | |
| $order | [array]: how to order the results | |
| $cnt | [boolean]: whether to return the number of results (if true) or the results themselves (if false, the default) |
$cnt == true), or null if there was an error Definition at line 68 of file TSDChapter.php5.
| TSDChapter::getParent | ( | ) |
Retrieves the book object to which this chapter belongs.
Reimplemented from TSDObject.
Definition at line 131 of file TSDChapter.php5.
| TSDChapter::isValid | ( | ) |
Determines whether chapter is valid to be in the database.
A chapter is valid if it has an empty id or the id is an integer greater than zero. It must also have a non-empty string value for its name and an integer greater than zero for bookId.
Reimplemented from TSDObject.
Definition at line 45 of file TSDChapter.php5.
| TSDChapter::listChildren | ( | $ | constraints = array(), |
|
| $ | limit = array(), |
|||
| $ | order = array(), |
|||
| $ | cnt = false, |
|||
| $ | withAlCnt = false | |||
| ) |
Returns a list of all sections contained in this chapter, constrained by given criteria.
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.
Only sections that belong to this book will be returned, although it is theoretically possible to circumvent this with the constraints array. With no arguments, an array of TSDsEction objects is returned, all of which belong to this chapter object.
| $constraints | [array]: additional constraints on the result set | |
| $limit | [array]: parameters for the LIMIT clause of the query | |
| $order | [array]: how to order the results | |
| $cnt | [boolean]: whether to return the number of results (if true) or the results themselves (if false, the default) | |
| $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 == true), or null if there was an error Definition at line 94 of file TSDChapter.php5.
References SConfig::getDefault().
| TSDChapter::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 |
Reimplemented from TSDObject.
Definition at line 122 of file TSDChapter.php5.
1.5.6