Class ContentModelCategory

Description

This models supports retrieving a category, the articles associated with the category, sibling, child and parent categories.

  • since: 1.5

Located in /components/com_content/models/category.php (line 21)

JObject
   |
   --JModel
      |
      --JModelList
         |
         --ContentModelCategory
Variable Summary
mixed $_articles
array $_categories
object $_category
mixed $_children
string $_context
array $_item
mixed $_parent
mixed $_siblings
Method Summary
ContentModelCategory __construct ([array $config = array()])
object getCategory (int 0)
mixed &getChildren (int 0)
mixed getItems ()
mixed &getLeftSibling ()
void getPagination ()
mixed getParent (int 0)
mixed &getRightSibling ()
void populateState ([ $ordering = null], [ $direction = null])
Variables
mixed $_articles = null (line 30)
  • access: protected
array $_categories = null (line 59)

The list of other newfeed categories.

  • access: protected
object $_category = null (line 51)

The category that applies.

  • access: protected
mixed $_children = null (line 34)
  • access: protected
string $_context = 'com_content.category' (line 43)

Model context string.

  • access: protected
array $_item = null (line 28)

Category items data

  • access: protected
mixed $_parent = null (line 36)
  • access: protected
mixed $_siblings = null (line 32)
  • access: protected

Inherited Variables

Inherited from JModelList

JModelList::$cache
JModelList::$context
JModelList::$filter_fields
JModelList::$query

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 68)

Constructor.

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

Redefinition of:
JModelList::__construct()
Constructor.
getCategory (line 299)

Method to get category data for the current category

  • since: 1.5
  • access: public
object getCategory (int 0)
  • int 0: An optional ID
getChildren (line 400)

Get the child categories.

  • return: An array of categories or false if an error occurs.
  • since: 1.6
mixed &getChildren (int 0)
  • int 0: An optional category id. If not supplied, the model state 'category.id' will be used.
getItems (line 205)

Get the articles in the category

  • return: An array of articles or false if an error occurs.
  • since: 1.5
mixed getItems ()

Redefinition of:
JModelList::getItems()
Method to get an array of data items.
getLeftSibling (line 368)

Get the left sibling (adjacent) categories.

  • return: An array of categories or false if an error occurs.
  • since: 1.6
mixed &getLeftSibling ()
getPagination (line 283)
  • access: public
void getPagination ()

Redefinition of:
JModelList::getPagination()
Method to get a JPagination object for the data set.
getParent (line 353)

Get the parent categorie.

  • return: An array of categories or false if an error occurs.
  • since: 1.6
  • access: public
mixed getParent (int 0)
  • int 0: An optional category id. If not supplied, the model state 'category.id' will be used.
getRightSibling (line 383)

Get the right sibling (adjacent) categories.

  • return: An array of categories or false if an error occurs.
  • since: 1.6
mixed &getRightSibling ()
populateState (line 104)

Method to auto-populate the model state.

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

return void

  • since: 1.6
  • access: protected
void populateState ([ $ordering = null], [ $direction = null])
  • $ordering
  • $direction

Redefinition of:
JModelList::populateState()
Method to auto-populate the model state.
_buildContentOrderBy (line 250)

Build the orderby for the query

  • return: portion of query
  • since: 1.5
  • access: protected
string _buildContentOrderBy ()

Inherited Methods

Inherited From JModelList

JModelList::__construct()
JModelList::getItems()
JModelList::getListQuery()
JModelList::getPagination()
JModelList::getStart()
JModelList::getStoreId()
JModelList::getTotal()
JModelList::getUserStateFromRequest()
JModelList::populateState()
JModelList::_getListQuery()

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:52:49 -0500 by phpDocumentor 1.4.4