/**
* Method to get a \JPagination object for the data set.
*
* @return Pagination A Pagination object for the data set.
*
* @since 1.6
*/
public function getPagination()
{
// Get a storage key.
$store = $this->getStoreId('getPagination');
// Try to load the data from internal storage.
if (isset($this->cache[$store])) {
return $this->cache[$store];
}
$limit = (int) $this->getState('list.limit') - (int) $this->getState('list.links');
// Create the pagination object and add the object to the internal cache.
$this->cache[$store] = new Pagination($this->getTotal(), $this->getStart(), $limit);
return $this->cache[$store];
}