[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_content/src/Model/ -> CategoryModel.php (summary)

(no description)

Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 484 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CategoryModel:: (11 methods):
  __construct()
  populateState()
  getItems()
  _buildContentOrderBy()
  getPagination()
  getCategory()
  getParent()
  getLeftSibling()
  getRightSibling()
  getChildren()
  hit()


Class: CategoryModel  - X-Ref

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

__construct($config = array()   X-Ref

param: array  $config  An optional associative array of configuration settings.

populateState($ordering = null, $direction = null)   X-Ref
Method to auto-populate the model state.

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

param: string  $ordering   The field to order on.
param: string  $direction  The direction to order on.
return: void

getItems()   X-Ref
Get the articles in the category

return: array|bool  An array of articles or false if an error occurs.

_buildContentOrderBy()   X-Ref
Build the orderby for the query

return: string  $orderby portion of query

getPagination()   X-Ref
Method to get a JPagination object for the data set.

return: \Joomla\CMS\Pagination\Pagination  A JPagination object for the data set.

getCategory()   X-Ref
Method to get category data for the current category

return: object

getParent()   X-Ref
Get the parent category.

return: mixed  An array of categories or false if an error occurs.

getLeftSibling()   X-Ref
Get the left sibling (adjacent) categories.

return: mixed  An array of categories or false if an error occurs.

getRightSibling()   X-Ref
Get the right sibling (adjacent) categories.

return: mixed  An array of categories or false if an error occurs.

getChildren()   X-Ref
Get the child categories.

return: mixed  An array of categories or false if an error occurs.

hit($pk = 0)   X-Ref
Increment the hit counter for the category.

param: int  $pk  Optional primary key of the category to increment.
return: boolean True if successful; false otherwise and internal error set.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer