API17

Difference between revisions of "JTableNested"

From Joomla! Documentation

m (moving preparation)
m (preparing for archive only)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
=={{JVer|11.1}} JTableNested==
 
=={{JVer|11.1}} JTableNested==
 
===Description===
 
===Description===
{{Description:JTableNested}}
+
JTableNested is a table class which supports modified pre-order [[wikipedia:tree traversal|tree traversal]] behaviour.  This class is derived from the base JTable class and adds methods to support a binary tree structure in the database, with pre-order being the preferred method of traversal.
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[Description:JTableNested|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
 
===Methods===
 
===Methods===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
Line 110: Line 108:
 
* {{JVer|11.1}} Subpackage [[API17:Subpackage Database|Database]]
 
* {{JVer|11.1}} Subpackage [[API17:Subpackage Database|Database]]
 
* [[API17:JTableNested|Other versions of JTableNested]]
 
* [[API17:JTableNested|Other versions of JTableNested]]
{{SeeAlso:JTableNested}}
+
 
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[SeeAlso:JTableNested|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
 
===User contributed notes===
 
===User contributed notes===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
noresultsheader=\n
 
noresultsheader=\n
 
category=JTableNested
 
category=JTableNested
category=CodeExample
+
namespace=CodeExample
 
category=ClassExample
 
category=ClassExample
 
include=*
 
include=*

Latest revision as of 22:49, 24 March 2017

The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Joomla 11.1 JTableNested[edit]

Description[edit]

JTableNested is a table class which supports modified pre-order tree traversal behaviour. This class is derived from the base JTable class and adds methods to support a binary tree structure in the database, with pre-order being the preferred method of traversal.

Methods[edit]

Visibility Method name Description
public check Asset that the nested set data is valid.
public debug Sets the debug level on or off.
public delete Method to delete a node, and optionally its child nodes, from the table.
public getPath Method to get an array of nodes from a given node to its root.
public getRootId Gets the ID of the root item in the tree.
public getTree Method to get a node and all its child nodes.
public isLeaf Method to determine if a node is a leaf node in the tree (has no children).
public move Method to move a row in the ordering sequence of a group of rows defined by an SQL WHERE clause.
public moveByReference Method to move a node and its children to a new location in the tree.
public orderDown Method to move a node one position to the right in the same level.
public orderUp Method to move a node one position to the left in the same level.
public publish Method to set the publishing state for a node or list of nodes in the database table.
public rebuild Method to recursively rebuild the whole nested set tree.
public rebuildPath Method to rebuild the node's path field from the alias values of the nodes from the current node to the root node of the tree.
public saveorder Method to update order of table rows.
public setLocation Method to set the location of a node in the tree object.
public store Method to store a node in the database table.
protected _getNode Method to get nested set properties for a node in the tree.
protected _getTreeRepositionData Method to get various data necessary to make room in the tree at a location for a node and its children.
protected _logtable
protected _runQuery

Importing[edit]

jimport( 'joomla.database.tablenested' );

See also[edit]


User contributed notes[edit]

Code Examples[edit]