[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_finder/src/Indexer/ -> Taxonomy.php (summary)

(no description)

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

Defines 1 class

Taxonomy:: (12 methods):
  addBranch()
  addNode()
  addNestedNode()
  storeNode()
  addMap()
  getBranchTitles()
  getNodeByTitle()
  removeMaps()
  removeOrphanMaps()
  removeOrphanNodes()
  getTaxonomy()
  getBranch()


Class: Taxonomy  - X-Ref

Taxonomy base class for the Finder indexer package.

addBranch($title, $state = 1, $access = 1)   X-Ref
Method to add a branch to the taxonomy tree.

param: string   $title   The title of the branch.
param: integer  $state   The published state of the branch. [optional]
param: integer  $access  The access state of the branch. [optional]
return: integer  The id of the branch.

addNode($branch, $title, $state = 1, $access = 1, $language = '')   X-Ref
Method to add a node to the taxonomy tree.

param: string   $branch    The title of the branch to store the node in.
param: string   $title     The title of the node.
param: integer  $state     The published state of the node. [optional]
param: integer  $access    The access state of the node. [optional]
param: string   $language  The language of the node. [optional]
return: integer  The id of the node.

addNestedNode($branch, NodeInterface $node, $state = 1, $access = 1, $language = '', $branchId = null)   X-Ref
Method to add a nested node to the taxonomy tree.

param: string         $branch    The title of the branch to store the node in.
param: NodeInterface  $node      The source-node of the taxonomy node.
param: integer        $state     The published state of the node. [optional]
param: integer        $access    The access state of the node. [optional]
param: string         $language  The language of the node. [optional]
param: integer        $branchId  ID of a branch if known. [optional]
return: integer  The id of the node.

storeNode($node, $parentId)   X-Ref
A helper method to store a node in the taxonomy

param: object   $node      The node data to include
param: integer  $parentId  The parent id of the node to add.
return: integer  The id of the inserted node.

addMap($linkId, $nodeId)   X-Ref
Method to add a map entry between a link and a taxonomy node.

param: integer  $linkId  The link to map to.
param: integer  $nodeId  The node to map to.
return: boolean  True on success.

getBranchTitles()   X-Ref
Method to get the title of all taxonomy branches.

return: array  An array of branch titles.

getNodeByTitle($branch, $title)   X-Ref
Method to find a taxonomy node in a branch.

param: string  $branch  The branch to search.
param: string  $title   The title of the node.
return: mixed  Integer id on success, null on no match.

removeMaps($linkId)   X-Ref
Method to remove map entries for a link.

param: integer  $linkId  The link to remove.
return: boolean  True on success.

removeOrphanMaps()   X-Ref
Method to remove orphaned taxonomy maps

return: integer  The number of deleted rows.

removeOrphanNodes()   X-Ref
Method to remove orphaned taxonomy nodes and branches.

return: integer  The number of deleted rows.

getTaxonomy($id = 0)   X-Ref
Get a taxonomy based on its id or all taxonomies

param: integer  $id  Id of the taxonomy
return: object|array  A taxonomy object or an array of all taxonomies

getBranch($title = '')   X-Ref
Get a taxonomy branch object based on its title or all branches

param: string  $title  Title of the branch
return: object|array  The object with the branch data or an array of all branches



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