JModelList: Difference between revisions
From Joomla! Documentation
m →User contributed notes: bad link repair |
m preparing for archive only |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=={{JVer|11.1}} JModelList== | =={{JVer|11.1}} JModelList== | ||
===Description=== | ===Description=== | ||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
| Line 14: | Line 12: | ||
|- | |- | ||
|public | |public | ||
|[[JModelList::__construct | |[[API17:JModelList::__construct|__construct]] | ||
|Constructor. | |Constructor. | ||
|- | |- | ||
|public | |public | ||
|[[JModelList::getItems | |[[API17:JModelList::getItems|getItems]] | ||
|Method to get an array of data items. | |Method to get an array of data items. | ||
|- | |- | ||
|public | |public | ||
|[[JModelList::getPagination | |[[API17:JModelList::getPagination|getPagination]] | ||
|Method to get a object for the data set. | |Method to get a object for the data set. | ||
|- | |- | ||
|public | |public | ||
|[[JModelList::getstart | |[[API17:JModelList::getstart|getstart]] | ||
|Method to get the starting number of items for the data set. | |Method to get the starting number of items for the data set. | ||
|- | |- | ||
|public | |public | ||
|[[JModelList::getTotal | |[[API17:JModelList::getTotal|getTotal]] | ||
|Method to get the total number of items for the data set. | |Method to get the total number of items for the data set. | ||
|- | |- | ||
|public | |public | ||
|[[JModelList::getUserStateFromRequest | |[[API17:JModelList::getUserStateFromRequest|getUserStateFromRequest]] | ||
|Gets the value of a user state variable and sets it in the session This is the same as the method in except that this also can optionally force you back to the first page when a filter has changed. | |Gets the value of a user state variable and sets it in the session This is the same as the method in except that this also can optionally force you back to the first page when a filter has changed. | ||
|- | |- | ||
|protected | |protected | ||
|[[JModelList::getListQuery | |[[API17:JModelList::getListQuery|getListQuery]] | ||
|Method to get a object for retrieving the data set from a database. | |Method to get a object for retrieving the data set from a database. | ||
|- | |- | ||
|protected | |protected | ||
|[[JModelList::getStoreId | |[[API17:JModelList::getStoreId|getStoreId]] | ||
|Method to get a store id based on the model configuration state. | |Method to get a store id based on the model configuration state. | ||
|- | |- | ||
|protected | |protected | ||
|[[JModelList::populateState | |[[API17:JModelList::populateState|populateState]] | ||
|Method to auto-populate the model state. | |Method to auto-populate the model state. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/application/component/modellist.php | * '''Defined in''' libraries/joomla/application/component/modellist.php | ||
* '''Extends''' [[JModel | * '''Extends''' [[API17:JModel|JModel]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.application.component.modellist' );</source> | <source lang="php">jimport( 'joomla.application.component.modellist' );</source> | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JModelList source code''' on [[jplatform:application/component/modellist.php|BitBucket]] | * {{JVer|11.1}} '''JModelList source code''' on [[jplatform:application/component/modellist.php|BitBucket]] | ||
* {{JVer|11.1}} Subpackage [[Subpackage Application | * {{JVer|11.1}} Subpackage [[API17:Subpackage Application|Application]] | ||
* [[JModelList|Other versions of JModelList]] | * [[API17:JModelList|Other versions of JModelList]] | ||
===User contributed notes=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JModelList | category=JModelList | ||
namespace=CodeExample | |||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| Line 73: | Line 69: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude> | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> | ||
Latest revision as of 03:28, 25 March 2017
JModelList
Description
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | __construct | Constructor. |
| public | getItems | Method to get an array of data items. |
| public | getPagination | Method to get a object for the data set. |
| public | getstart | Method to get the starting number of items for the data set. |
| public | getTotal | Method to get the total number of items for the data set. |
| public | getUserStateFromRequest | Gets the value of a user state variable and sets it in the session This is the same as the method in except that this also can optionally force you back to the first page when a filter has changed. |
| protected | getListQuery | Method to get a object for retrieving the data set from a database. |
| protected | getStoreId | Method to get a store id based on the model configuration state. |
| protected | populateState | Method to auto-populate the model state. |
- Defined in libraries/joomla/application/component/modellist.php
- Extends JModel
Importing
jimport( 'joomla.application.component.modellist' );
See also
JModelList source code on BitBucket
Subpackage Application- Other versions of JModelList
User contributed notes
Code Examples