\Kendo\UI\Pager
A PHP wrapper for Kendo UI Pager.
Inherits from \Kendo\UI\Widget.
Usage
To use Pager in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo Pager
<?php
// Create a new instance of Pager and specify its id
$pager = new \Kendo\UI\Pager('Pager');
// Configure it
$pager->autoBind(true)
// Output it
echo $pager->render();
?>
Methods
ARIATemplate
Specifies a template used to populate the value of the aria-label attribute of the pager element.The parameters available for the template are: page - The current page. or totalPages - The total number of pages..
Returns
\Kendo\UI\Pager
Parameters
$value string
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->ARIATemplate('value');
?>
autoBind
Indicates whether the pager refresh method will be called within its initialization.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->autoBind(true);
?>
buttonCount
Defines the number of buttons displayed in the numeric pager.
Returns
\Kendo\UI\Pager
Parameters
$value float
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->buttonCount(1);
?>
change
Fires when the current page has changed. For additional information check the change event documentation.
Returns
\Kendo\UI\Pager
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->change('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onChange(e) {
// handle the change event.
}
</script>
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->change('onChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
dataSource
Sets the data source of the widget.
Returns
\Kendo\UI\Pager
Parameters
$value \Kendo\Data\DataSource|array
Example - using \Kendo\Data\DataSource
<?php
$pager = new \Kendo\UI\Pager('Pager');
$dataSource = new \Kendo\Data\DataSource();
$pager->dataSource($dataSource);
?>
Example - using array
<?php
$pager = new \Kendo\UI\Pager('Pager');
$schema = new \Kendo\Data\DataSourceSchema();
$pager->dataSource(array('schema' => $schema));
?>
info
Defines if a label showing current paging information will be displayed.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->info(true);
?>
input
Defines if an input element which allows the user to navigate to given page will be displayed.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->input(true);
?>
linkTemplate
The template for page number links.
Returns
\Kendo\UI\Pager
Parameters
$value string
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->linkTemplate('value');
?>
messages
Defines texts shown within the pager. Use this option to customize or localize the pager messages.
Returns
\Kendo\UI\Pager
Parameters
$value \Kendo\UI\PagerMessages|array
Example - using \Kendo\UI\PagerMessages
<?php
$pager = new \Kendo\UI\Pager('Pager');
$messages = new \Kendo\UI\PagerMessages();
$allPages = 'value';
$messages->allPages($allPages);
$pager->messages($messages);
?>
Example - using array
<?php
$pager = new \Kendo\UI\Pager('Pager');
$allPages = 'value';
$pager->messages(array('allPages' => $allPages));
?>
navigatable
If set to true the user could navigate the widget using the keyboard navigation. By default keyboard navigation is disabled.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->navigatable(true);
?>
numeric
Defines if numeric portion of the pager will be shown.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->numeric(true);
?>
pageSizes
If set to true the pager will display a drop-down which allows the user to pick a page size. By default the page size drop-down is not displayed.Can be set to an array of predefined page sizes to override the default list. A special all value is supported. It sets the page size to the total number of records.If a pageSize setting is provided for the data source then this value will be selected initially.
Returns
\Kendo\UI\Pager
Parameters
$value boolean|array
Example - using boolean
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->pageSizes(true);
?>
Example - using array
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->pageSizes(array());
?>
previousNext
Defines if buttons for navigating to the first, last, previous and next pages will be shown.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->previousNext(true);
?>
refresh
Defines if a refresh button will be displayed. Click on that button will call DataSource read() method to get actual data.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->refresh(true);
?>
responsive
Defines if the pager will be responsive.
Returns
\Kendo\UI\Pager
Parameters
$value boolean
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->responsive(true);
?>
selectTemplate
The template for selected page number link.
Returns
\Kendo\UI\Pager
Parameters
$value string
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->selectTemplate('value');
?>
size
Sets a value controlling size of the component. Can also be set to the following string values: "small"; "medium"; "large" or "none".
Returns
\Kendo\UI\Pager
Parameters
$value string
Example
<?php
$pager = new \Kendo\UI\Pager('Pager');
$pager->size('value');
?>