[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
(no description)
Copyright: | 1999 onwards Martin Dougiamas and others {@link http://moodle.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 312 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct(view $qbank) X-Ref |
Constructor. param: $qbank the question_bank_view we are helping to render. |
init() X-Ref |
A chance for subclasses to initialise themselves, for example to load lang strings, without having to override the constructor. |
set_as_heading() X-Ref |
Set the column as heading |
is_extra_row() X-Ref |
No description |
display_header() X-Ref |
Output the column header cell. |
get_title_tip() X-Ref |
return: string a fuller version of the name. Use this when get_title() returns |
make_sort_link($sort, $title, $tip, $defaultreverse = false) X-Ref |
Get a link that changes the sort order, and indicates the current sort state. param: $name internal name used for this type of sorting. param: $currentsort the current sort order -1, 0, 1 for descending, none, ascending. param: $title the link text. param: $defaultreverse whether the default sort order for this column is descending, rather than ascending. return: string HTML fragment. |
get_sort_icon($reverse) X-Ref |
Get an icon representing the corrent sort state. param: $reverse sort is descending, not ascending. return: string HTML image tag. |
display($question, $rowclasses) X-Ref |
Output this column. param: object $question the row from the $question table, augmented with extra information. param: string $rowclasses CSS class names that should be applied to this row of output. |
display_start($question, $rowclasses) X-Ref |
Output the opening column tag. If it is set as heading, it will use <th> tag instead of <td> param: stdClass $question param: array $rowclasses |
get_classes() X-Ref |
return: string the CSS classes to apply to every cell in this column. |
get_extra_classes() X-Ref |
return: array any extra class names you would like applied to every cell in this column. |
display_end($question, $rowclasses) X-Ref |
Output the closing column tag param: object $question param: string $rowclasses |
get_extra_joins() X-Ref |
Return an array 'table_alias' => 'JOIN clause' to bring in any data that this column required. The return values for all the columns will be checked. It is OK if two columns join in the same table with the same alias and identical JOIN clauses. If to columns try to use the same alias with different joins, you get an error. The only table included by default is the question table, which is aliased to 'q'. It is importnat that your join simply adds additional data (or NULLs) to the existing rows of the query. It must not cause additional rows. return: array 'table_alias' => 'JOIN clause' |
get_required_fields() X-Ref |
return: array fields required. use table alias 'q' for the question table, or one of the |
is_sortable() X-Ref |
Can this column be sorted on? You can return either: + false for no (the default), + a field name, if sorting this column corresponds to sorting on that datbase field. + an array of subnames to sort on as follows return array( 'firstname' => array('field' => 'uc.firstname', 'title' => get_string('firstname')), 'lastname' => array('field' => 'uc.lastname', 'field' => get_string('lastname')), ); As well as field, and field, you can also add 'revers' => 1 if you want the default sort order to be DESC. return: mixed as above. |
sortorder($reverse) X-Ref |
Helper method for building sort clauses. param: bool $reverse whether the normal direction should be reversed. param: string $normaldir 'ASC' or 'DESC' return: string 'ASC' or 'DESC' |
sort_expression($reverse, $subsort) X-Ref |
param: $reverse Whether to sort in the reverse of the default sort order. param: $subsort if is_sortable returns an array of subnames, then this will be return: string some SQL to go in the order by clause. |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |