Back to Joomla project (class list)

Class Categories - list of methods

Categories Class.

Extends

Package: Joomla\CMS\Categories
Copyright: (C) 2017 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Categories/Categories.php
Project: Joomla

Method Summary

public
(mixed $options)

Class constructor
Parameters
  • array $options Array of options
Since
  • 1.6
Show source code of this method: __construct Source Code

public static \Joomla\CMS\Categories\Categories|bool
(mixed $extension, mixed $options = array())

Returns a reference to a Categories object
Parameters
  • string $extension Name of the categories extension
  • array $options An array of options
Returns
  • \Joomla\CMS\Categories\Categories|bool Categories object on success, boolean false if an object does not exist
Since
  • 1.6
Deprecated
  • 5.0
Show source code of this method: getInstance Source Code

public \Joomla\CMS\Categories\CategoryNode|null
(mixed $id = 'root', mixed $forceload = false)

Loads a specific category and all its children in a CategoryNode object.
Parameters
  • mixed $id an optional id integer or equal to 'root'
  • bool $forceload True to force the _load method to execute
Returns
  • \Joomla\CMS\Categories\CategoryNode|null CategoryNode object or null if $id is not valid
Since
  • 1.6
Show source code of this method: get Source Code

public string
()

Returns the extension of the category.
Returns
  • string The extension
Since
  • 3.9.0
Show source code of this method: getExtension Source Code

protected void
(mixed $id)

Load method
Parameters
  • int $id Id of category to load
Returns
  • void
Since
  • 1.6
Show source code of this method: _load Source Code

Properties Summary

public static \Joomla\CMS\Categories\Categories[]
$instances
Array to hold the object instances
Since
  • 1.6
protected \Joomla\CMS\Categories\CategoryNode[]
$_nodes
Array of category nodes
Since
  • 1.6
protected bool[]
$_checkedCategories
Array of checked categories -- used to save values when _nodes are null
Since
  • 1.6
protected string
$_extension
Name of the extension the categories belong to
Since
  • 1.6
protected string
$_table
Name of the linked content table to get category content count
Since
  • 1.6
protected string
$_field
Name of the category field
Since
  • 1.6
protected string
$_key
Name of the key field
Since
  • 1.6
protected string
$_statefield
Name of the items state field
Since
  • 1.6
protected array
$_options
Array of options
Since
  • 1.6

Tags Summary

Since
1.6