Class JModelList

Description

Model class for handling lists of items.

  • since: 11.1

Located in /libraries/joomla/application/component/modellist.php (line 21)

JObject
   |
   --JModel
      |
      --JModelList
Direct descendents
Class Description
NewsfeedsModelCategory Newsfeeds Component Category Model
WeblinksModelCategory Weblinks Component Weblink Model
FinderModelSuggestions Suggestions model class for the Finder package.
FinderModelSearch Search model class for the Finder package.
ContactModelCategory
ContactModelFeatured
ContentModelCategory This models supports retrieving a category, the articles associated with the category, sibling, child and parent categories.
ContentModelArticles Methods supporting a list of article records.
BannersModelBanners Methods supporting a list of banner records.
CheckinModelCheckin Checkin Model
ModulesModelPositions Modules Component Positions Model
ModulesModelModules Modules Component Module Model
ModulesModelSelect Module model.
MessagesModelMessages Messages Component Messages Model
UsersModelUsers Methods supporting a list of user records.
UsersModelDebugGroup Methods supporting a list of user records.
UsersModelLevels Methods supporting a list of user access level records.
UsersModelNotes User notes model class.
UsersModelDebugUser Methods supporting a list of user records.
UsersModelGroups Methods supporting a list of user group records.
NewsfeedsModelNewsfeeds Methods supporting a list of newsfeed records.
LanguagesModelOverrides Languages Overrides Model
LanguagesModelLanguages Languages Model Class
LanguagesModelInstalled Languages Component Languages Model
WeblinksModelWeblinks Methods supporting a list of weblink records.
PluginsModelPlugins Methods supporting a list of plugin records.
InstallerModel Extension Manager Abstract Extension Model
InstallerModelWarnings Extension Manager Templates Model
InstallerModelUpdate
CategoriesModelCategories Categories Component Categories Model
RedirectModelLinks Methods supporting a list of redirect links.
TemplatesModelTemplates Methods supporting a list of template extension records.
TemplatesModelStyles Methods supporting a list of template style records.
FinderModelIndex Index model class for Finder.
FinderModelFilters Filters model class for Finder.
FinderModelMaps Maps model for the Finder package.
ContactModelContacts Methods supporting a list of contact records.
SearchModelSearches Methods supporting a list of search terms.
MenusModelItems Menu Item List Model for Menus.
MenusModelMenus Menu List Model for Menus.
BannersModelTracks Methods supporting a list of tracks.
BannersModelClients Methods supporting a list of banner records.
CacheModelCache Cache Model
Variable Summary
Method Summary
JModelList __construct ([array $config = array()])
mixed getItems ()
integer getStart ()
string getStoreId ([string $id = ''])
integer getTotal ()
The getUserStateFromRequest (string $key, string $request, [string $default = null], [string $type = 'none'], [boolean $resetPage = true])
void populateState ([string $ordering = null], [string $direction = null])
Variables
array $cache = array() (line 29)

Internal memory based cache array of data.

  • since: 11.1
  • access: protected
string $context = null (line 38)

Context string for the model type. This is used to handle uniqueness when dealing with the getStoreId() method and caching data structures.

  • since: 11.1
  • access: protected

Redefined in descendants as:
array $filter_fields = array() (line 46)

Valid filter fields or ordering.

  • since: 11.1
  • access: protected
JDatabaseQuery $query = array() (line 54)

An internal cache for the last query used.

  • since: 11.1
  • access: protected

Redefined in descendants as:
  • FinderModelSearch::$query : The query object is an instance of FinderIndexerQuery which contains and models the entire search query including the text input; static and dynamic taxonomy filters; date filters; etc.

Inherited Variables

Inherited from JModel

JModel::$event_clean_cache
JModel::$name
JModel::$option
JModel::$state
JModel::$_db
JModel::$__state_set

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 64)

Constructor.

JModelList __construct ([array $config = array()])
  • array $config: An optional associative array of configuration settings.

Redefinition of:
JModel::__construct()
Constructor

Redefined in descendants as:
getItems (line 115)

Method to get an array of data items.

  • return: An array of data items on success, false on failure.
  • since: 11.1
  • access: public
mixed getItems ()

Redefined in descendants as:
getListQuery (line 150)

Method to get a JDatabaseQuery object for retrieving the data set from a database.

  • return: A JDatabaseQuery object to retrieve the data set.
  • since: 11.1
  • access: protected
JDatabaseQuery getListQuery ()

Redefined in descendants as:
getPagination (line 165)

Method to get a JPagination object for the data set.

  • return: A JPagination object for the data set.
  • since: 11.1
  • access: public
JPagination getPagination ()

Redefined in descendants as:
getStart (line 253)

Method to get the starting number of items for the data set.

  • return: The starting number of items available in the data set.
  • since: 11.1
  • access: public
integer getStart ()
getStoreId (line 200)

Method to get a store id based on the model configuration state.

This is necessary because the model is used by the component and different modules that might need different sets of data or different ordering requirements.

  • return: A store id.
  • since: 11.1
  • access: protected
string getStoreId ([string $id = ''])
  • string $id: An identifier string to generate the store id.

Redefined in descendants as:
getTotal (line 218)

Method to get the total number of items for the data set.

  • return: The total number of items available in the data set.
  • since: 11.1
  • access: public
integer getTotal ()

Redefined in descendants as:
getUserStateFromRequest (line 349)

Gets the value of a user state variable and sets it in the session

This is the same as the method in JApplication except that this also can optionally force you back to the first page when a filter has changed

  • return: request user state.
  • since: 11.1
  • access: public
The getUserStateFromRequest (string $key, string $request, [string $default = null], [string $type = 'none'], [boolean $resetPage = true])
  • string $key: The key of the user state variable.
  • string $request: The name of the variable passed in a request.
  • string $default: The default value for the variable if not found. Optional.
  • string $type: Filter for the variable, for valid values see JFilterInput::clean(). Optional.
  • boolean $resetPage: If true, the limitstart in request is set to zero
populateState (line 293)

Method to auto-populate the model state.

This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the model configuration flag to ignore the request is set.

Note. Calling getState in this method will result in recursion.

  • since: 11.1
  • access: protected
void populateState ([string $ordering = null], [string $direction = null])
  • string $ordering: An optional ordering field.
  • string $direction: An optional direction (asc|desc).

Redefinition of:
JModel::populateState()
Method to auto-populate the model state.

Redefined in descendants as:
_getListQuery (line 90)

Method to cache the last query constructed.

This method ensures that the query is constructed only once for a given state of the model.

  • return: A JDatabaseQuery object
  • since: 11.1
  • access: protected
JDatabaseQuery _getListQuery ()

Inherited Methods

Inherited From JModel

JModel::__construct()
JModel::addIncludePath()
JModel::addTablePath()
JModel::cleanCache()
JModel::getDbo()
JModel::getInstance()
JModel::getName()
JModel::getState()
JModel::getTable()
JModel::populateState()
JModel::setDbo()
JModel::setState()
JModel::_createFileName()
JModel::_createTable()
JModel::_getList()
JModel::_getListCount()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:57:30 -0500 by phpDocumentor 1.4.4