CLinkPager
CLinkPager displays a list of hyperlinks that lead to different pages of target.
Property Details
public mixed $cssFile;
the CSS file used for the widget. Defaults to null, meaning
using the default CSS file included together with the widget.
If false, no CSS file will be used. Otherwise, the specified CSS file
will be included when using this widget.
public string $firstPageLabel;
the text label for the first page button. Defaults to '<< First'.
public string $footer;
the text shown after page buttons.
public string $header;
the text shown before page buttons. Defaults to 'Go to page: '.
public array $htmlOptions;
HTML attributes for the pager container tag.
public string $lastPageLabel;
the text label for the last page button. Defaults to 'Last >>'.
public integer $maxButtonCount;
maximum number of page buttons that can be displayed. Defaults to 10.
public string $nextPageLabel;
the text label for the next page button. Defaults to 'Next >'.
the begin and end pages that need to be displayed.
public string $prevPageLabel;
the text label for the previous page button. Defaults to '< Previous'.
Method Details
|
protected string createPageButton(string $label, integer $page, string $class, boolean $hidden, boolean $selected)
|
| $label |
string |
the text label for the button |
| $page |
integer |
the page number |
| $class |
string |
the CSS class for the page button. This could be 'page', 'first', 'last', 'next' or 'previous'. |
| $hidden |
boolean |
whether this page button is visible |
| $selected |
boolean |
whether this page button is selected |
| {return} |
string |
the generated button |
Creates a page button.
You may override this method to customize the page buttons.
|
protected array createPageButtons()
|
| {return} |
array |
a list of page buttons (in HTML code). |
Creates the page buttons.
|
protected array getPageRange()
|
| {return} |
array |
the begin and end pages that need to be displayed. |
Initializes the pager by setting some default property values.
|
public void registerClientScript()
|
Registers the needed client scripts (mainly CSS file).
|
public static void registerCssFile(string $url=NULL)
|
| $url |
string |
the CSS URL. If null, a default CSS URL will be used. |
Registers the needed CSS file.
Executes the widget.
This overrides the parent implementation by displaying the generated page buttons.
Whether the firsPageLabel or lastPageLabel is displayed is controlled by the css. This is not obvious and should be noted in the documentation.