API15

JModelList/getPagination: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Method to get a JPagination object for the data set. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JModelList/getPagination|Edit ...
 
m removing red link to edit, no existant pages
Line 3: Line 3:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JModelList/getPagination|Edit Descripton]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>


{{Description:JModelList/getPagination}}
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 44: Line 44:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JModelList/getPagination|Edit See Also]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>
{{SeeAlso:JModelList/getPagination}}
<! removed transcluded page call, red link never existed >


===Examples===
===Examples===
Line 59: Line 59:
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API15]]

Revision as of 18:37, 12 May 2013

Description

Method to get a JPagination object for the data set.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

getPagination()


Returns

object A JPagination object for the data set.

Defined in

libraries/joomla/application/component/modellist.php

Importing

jimport( 'joomla.application.component.modellist' );

Source Body

public function getPagination()
{
        // Get a storage key.
        $store = $this->_getStoreId('getPagination');

        // Try to load the data from internal storage.
        if (!empty($this->_cache[$store])) {
                return $this->_cache[$store];
        }

        // Create the pagination object.
        jimport('joomla.html.pagination');
        $page = new JPagination($this->getTotal(), (int) $this->getState('list.start'), (int) $this->getState('list.limit'));

        // Add the object to the internal cache.
        $this->_cache[$store] = $page;

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

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />