Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Taxonomy

Fonctions membres publiques statiques

static addBranch ($title, $state=1, $access=1)
 
static addNode ($branch, $title, $state=1, $access=1, $language='')
 
static addNestedNode ($branch, NodeInterface $node, $state=1, $access=1, $language='', $branchId=null)
 
static addMap ($linkId, $nodeId)
 
static getBranchTitles ()
 
static getNodeByTitle ($branch, $title)
 
static removeMaps ($linkId)
 
static removeOrphanMaps ()
 
static removeOrphanNodes ()
 
static getTaxonomy ($id=0)
 
static getBranch ($title='')
 

Attributs publics statiques

static $taxonomies = array()
 
static $branches = array()
 
static $nodes = array()
 

Fonctions membres protégées statiques

static storeNode ($node, $parentId)
 

Description détaillée

Taxonomy base class for the Finder indexer package.

Depuis
2.5

Documentation des fonctions membres

◆ addBranch()

static addBranch (   $title,
  $state = 1,
  $access = 1 
)
static

Method to add a branch to the taxonomy tree.

Paramètres
string$titleThe title of the branch.
integer$stateThe published state of the branch. [optional]
integer$accessThe access state of the branch. [optional]
Renvoie
integer The id of the branch.
Depuis
2.5
Exceptions

Références $state, et $title.

◆ addMap()

static addMap (   $linkId,
  $nodeId 
)
static

Method to add a map entry between a link and a taxonomy node.

Paramètres
integer$linkIdThe link to map to.
integer$nodeIdThe node to map to.
Renvoie
boolean True on success.
Depuis
2.5
Exceptions

Références $db, $id, $query, et Factory\getDbo().

Référencé par Indexer\index().

◆ addNestedNode()

static addNestedNode (   $branch,
NodeInterface  $node,
  $state = 1,
  $access = 1,
  $language = '',
  $branchId = null 
)
static

Method to add a nested node to the taxonomy tree.

Paramètres
string$branchThe title of the branch to store the node in.
NodeInterface$nodeThe source-node of the taxonomy node.
integer$stateThe published state of the node. [optional]
integer$accessThe access state of the node. [optional]
string$languageThe language of the node. [optional]
integer$branchIdID of a branch if known. [optional]
Renvoie
integer The id of the node.
Depuis
4.0.0

Références $language, $state, $temp, et ImmutableNodeInterface\getParent().

Référencé par Indexer\index().

◆ addNode()

static addNode (   $branch,
  $title,
  $state = 1,
  $access = 1,
  $language = '' 
)
static

Method to add a node to the taxonomy tree.

Paramètres
string$branchThe title of the branch to store the node in.
string$titleThe title of the node.
integer$stateThe published state of the node. [optional]
integer$accessThe access state of the node. [optional]
string$languageThe language of the node. [optional]
Renvoie
integer The id of the node.
Depuis
2.5
Exceptions

Références $language, $state, et $title.

Référencé par Indexer\index().

◆ getBranch()

static getBranch (   $title = '')
static

Get a taxonomy branch object based on its title or all branches

Paramètres
string$titleTitle of the branch
Renvoie
object|array The object with the branch data or an array of all branches
Depuis
4.0.0

Références $taxonomies, et $title.

◆ getBranchTitles()

static getBranchTitles ( )
static

Method to get the title of all taxonomy branches.

Renvoie
array An array of branch titles.
Depuis
2.5
Exceptions

Références $db, $groups, $query, Factory\getDbo(), et Factory\getUser().

Référencé par Query\processString().

◆ getNodeByTitle()

static getNodeByTitle (   $branch,
  $title 
)
static

Method to find a taxonomy node in a branch.

Paramètres
string$branchThe branch to search.
string$titleThe title of the node.
Renvoie
mixed Integer id on success, null on no match.
Depuis
2.5
Exceptions

Références $db, $groups, $query, $title, Factory\getDbo(), et Factory\getUser().

Référencé par Query\processString().

◆ getTaxonomy()

static getTaxonomy (   $id = 0)
static

Get a taxonomy based on its id or all taxonomies

Paramètres
integer$idId of the taxonomy
Renvoie
object|array A taxonomy object or an array of all taxonomies
Depuis
4.0.0

Références $db, $id, $query, $taxonomies, et Factory\getDbo().

Référencé par Result\__unserialize().

◆ removeMaps()

static removeMaps (   $linkId)
static

Method to remove map entries for a link.

Paramètres
integer$linkIdThe link to remove.
Renvoie
boolean True on success.
Depuis
2.5
Exceptions

Références $db, $query, et Factory\getDbo().

Référencé par Indexer\index(), et Indexer\remove().

◆ removeOrphanMaps()

static removeOrphanMaps ( )
static

Method to remove orphaned taxonomy maps

Renvoie
integer The number of deleted rows.
Depuis
4.2.0
Exceptions

Références $count, $db, $query, et Factory\getDbo().

Référencé par Indexer\optimize().

◆ removeOrphanNodes()

static removeOrphanNodes ( )
static

Method to remove orphaned taxonomy nodes and branches.

Renvoie
integer The number of deleted rows.
Depuis
2.5
Exceptions

Références $db, $query, et Factory\getDbo().

Référencé par Indexer\optimize(), Adapter\reindex(), et Indexer\remove().

◆ storeNode()

static storeNode (   $node,
  $parentId 
)
staticprotected

A helper method to store a node in the taxonomy

Paramètres
object$nodeThe node data to include
integer$parentIdThe parent id of the node to add.
Renvoie
integer The id of the inserted node.
Depuis
4.0.0
Exceptions

Références $db, $query, $result, et Factory\getDbo().

Documentation des champs

◆ $branches

$branches = array()
static

◆ $nodes

$nodes = array()
static

◆ $taxonomies

$taxonomies = array()
static

La documentation de cette classe a été générée à partir du fichier suivant :