Pagination

Pagination

When there are too much data to be displayed on a single page, a common strategy is to display them in multiple pages and on each page only display a small portion of the data. This strategy is known as pagination.

Yii uses a yii\data\Pagination object to represent the information about a pagination scheme. In particular,

  • total count specifies the total number of data items. Note that this is usually much more than the number of data items needed to display on a single page.
  • page size specifies how many data items each page contains. The default value is 20.
  • current page gives the current page number (zero-based). The default v