List Model

It is a method to get a \JPagination object for the data set.

  • return \JPagination - A \JPagination object for the data set.
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 \JPagination($this->getTotal(), $this->getStart(), $limit);

return $this->cache[$store];
}