| Moodle PHP Documentation 4.4
    Moodle 4.4.9+ (Build: 20250711) (4ea86454947) | 
Component representing a paging bar. More...
 
  
| Public Member Functions | |
| __construct ($totalcount, $page, $perpage, $baseurl, $pagevar='page') | |
| Constructor paging_bar with only the required params. | |
| export_for_template (renderer_base $output) | |
| Export for template. | |
| prepare (renderer_base $output, moodle_page $page, $target) | |
| Prepares the paging bar for output. | |
| Public Attributes | |
| string moodle_url | $baseurl | 
| If this is a string then it is the url which will be appended with $pagevar, an equals sign and the page number. | |
| string | $firstlink = null | 
| A HTML link representing the first page. | |
| string | $lastlink = null | 
| A HTML link representing the last page. | |
| int | $maxdisplay = 18 | 
| The maximum number of pagelinks to display. | |
| string | $nextlink = null | 
| A HTML link representing the "next" page. | |
| int | $page | 
| The page you are currently viewing. | |
| array | $pagelinks = array() | 
| An array of strings. | |
| string | $pagevar | 
| This is the variable name that you use for the pagenumber in your code (ie. | |
| int | $perpage | 
| The number of entries that should be shown per page. | |
| string | $previouslink = null | 
| A HTML link representing the "previous" page. | |
| int | $totalcount | 
| The total number of entries to be pages through. | |
Component representing a paging bar.
| paging_bar::__construct | ( | $totalcount, | |
| $page, | |||
| $perpage, | |||
| $baseurl, | |||
| $pagevar = 'page' ) | 
Constructor paging_bar with only the required params.
| int | $totalcount | The total number of entries available to be paged through | 
| int | $page | The page you are currently viewing | 
| int | $perpage | The number of entries that should be shown per page | 
| string | moodle_url | $baseurl | url of the current page, the $pagevar parameter is added | 
| string | $pagevar | name of page parameter that holds the page number | 
| paging_bar::export_for_template | ( | renderer_base | $output | ) | 
Export for template.
| renderer_base | $output | The renderer. | 
| stdClass | 
Implements templatable.
| paging_bar::prepare | ( | renderer_base | $output, | 
| moodle_page | $page, | ||
| $target ) | 
Prepares the paging bar for output.
This method validates the arguments set up for the paging bar and then produces fragments of HTML to assist display later on.
| renderer_base | $output | |
| moodle_page | $page | |
| string | $target | 
| coding_exception | 
| string moodle_url paging_bar::$baseurl | 
If this is a string then it is the url which will be appended with $pagevar, an equals sign and the page number.
If this is a moodle_url object then the pagevar param will be replaced by the page no, for each page.
| array paging_bar::$pagelinks = array() | 
An array of strings.
One of them is just a string: the current page
| string paging_bar::$pagevar | 
This is the variable name that you use for the pagenumber in your code (ie.
'tablepage', 'blogpage', etc)
| int paging_bar::$totalcount | 
The total number of entries to be pages through.