Index: trunk/extensions/EducationProgram/includes/EPDBObject.php |
— | — | @@ -15,11 +15,29 @@ |
16 | 16 | * * insertIntoDB |
17 | 17 | * * updateInDB |
18 | 18 | * * loadSummaryFields |
| 19 | + * * getSummaryFields |
19 | 20 | * |
20 | 21 | * Deriving classes must register their table and field prefix in $egEPDBObjects. |
21 | 22 | * Syntax: $egEPDBObjects['DrivingClassName'] = array( 'table' => 'table_name', 'prefix' => 'fieldprefix_' ); |
22 | 23 | * Example: $egEPDBObjects['EPOrg'] = array( 'table' => 'ep_orgs', 'prefix' => 'org_' ); |
23 | 24 | * |
| 25 | + * Main instance methods: |
| 26 | + * * getField(s) |
| 27 | + * * setField(s) |
| 28 | + * * writeToDB |
| 29 | + * * removeFromDB |
| 30 | + * * updateInDB |
| 31 | + * |
| 32 | + * Main static methods: |
| 33 | + * * select |
| 34 | + * * update |
| 35 | + * * delete |
| 36 | + * * count |
| 37 | + * * has |
| 38 | + * * selectRow |
| 39 | + * * selectFields |
| 40 | + * * selectFieldsRow |
| 41 | + * |
24 | 42 | * @since 0.1 |
25 | 43 | * |
26 | 44 | * @file EPDBObject.php |
Index: trunk/extensions/EducationProgram/includes/EPOrg.php |
— | — | @@ -63,6 +63,21 @@ |
64 | 64 | 'online_ambs' => 0, |
65 | 65 | ); |
66 | 66 | } |
| 67 | + |
| 68 | + /** |
| 69 | + * (non-PHPdoc) |
| 70 | + * @see EPDBObject::getSummaryFields() |
| 71 | + */ |
| 72 | + public static function getSummaryFields() { |
| 73 | + return array( |
| 74 | + 'active', |
| 75 | + 'courses', |
| 76 | + 'students', |
| 77 | + 'instructors', |
| 78 | + 'campus_ambs', |
| 79 | + 'online_ambs', |
| 80 | + ); |
| 81 | + } |
67 | 82 | |
68 | 83 | /** |
69 | 84 | * (non-PHPdoc) |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -141,6 +141,16 @@ |
142 | 142 | 'students' => 0, |
143 | 143 | ); |
144 | 144 | } |
| 145 | + |
| 146 | + /** |
| 147 | + * (non-PHPdoc) |
| 148 | + * @see EPDBObject::getSummaryFields() |
| 149 | + */ |
| 150 | + public static function getSummaryFields() { |
| 151 | + return array( |
| 152 | + 'students', |
| 153 | + ); |
| 154 | + } |
145 | 155 | |
146 | 156 | /** |
147 | 157 | * Returns the students enrolled in this course. |