API17:JTableNested
From Joomla! Documentation
(Difference between revisions)
(Bulk upload by Doxiki2) |
m (→User contributed notes: bad link repair) |
||
| (2 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | =={{JVer|11.1}} JTableNested== | ||
| + | ===Description=== | ||
| + | {{Description:JTableNested}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JTableNested|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JTableNested|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
| + | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::check/11.1|check]] | |[[JTableNested::check/11.1|check]] | ||
|Asset that the nested set data is valid. | |Asset that the nested set data is valid. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::debug/11.1|debug]] | |[[JTableNested::debug/11.1|debug]] | ||
|Sets the debug level on or off. | |Sets the debug level on or off. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::delete/11.1|delete]] | |[[JTableNested::delete/11.1|delete]] | ||
|Method to delete a node, and optionally its child nodes, from the table. | |Method to delete a node, and optionally its child nodes, from the table. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::getPath/11.1|getPath]] | |[[JTableNested::getPath/11.1|getPath]] | ||
|Method to get an array of nodes from a given node to its root. | |Method to get an array of nodes from a given node to its root. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::getRootId/11.1|getRootId]] | |[[JTableNested::getRootId/11.1|getRootId]] | ||
|Gets the ID of the root item in the tree. | |Gets the ID of the root item in the tree. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::getTree/11.1|getTree]] | |[[JTableNested::getTree/11.1|getTree]] | ||
|Method to get a node and all its child nodes. | |Method to get a node and all its child nodes. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::isLeaf/11.1|isLeaf]] | |[[JTableNested::isLeaf/11.1|isLeaf]] | ||
|Method to determine if a node is a leaf node in the tree (has no children). | |Method to determine if a node is a leaf node in the tree (has no children). | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::move/11.1|move]] | |[[JTableNested::move/11.1|move]] | ||
|Method to move a row in the ordering sequence of a group of rows defined by an SQL WHERE clause. | |Method to move a row in the ordering sequence of a group of rows defined by an SQL WHERE clause. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::moveByReference/11.1|moveByReference]] | |[[JTableNested::moveByReference/11.1|moveByReference]] | ||
|Method to move a node and its children to a new location in the tree. | |Method to move a node and its children to a new location in the tree. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::orderDown/11.1|orderDown]] | |[[JTableNested::orderDown/11.1|orderDown]] | ||
|Method to move a node one position to the right in the same level. | |Method to move a node one position to the right in the same level. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::orderUp/11.1|orderUp]] | |[[JTableNested::orderUp/11.1|orderUp]] | ||
|Method to move a node one position to the left in the same level. | |Method to move a node one position to the left in the same level. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::publish/11.1|publish]] | |[[JTableNested::publish/11.1|publish]] | ||
|Method to set the publishing state for a node or list of nodes in the database table. | |Method to set the publishing state for a node or list of nodes in the database table. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::rebuild/11.1|rebuild]] | |[[JTableNested::rebuild/11.1|rebuild]] | ||
|Method to recursively rebuild the whole nested set tree. | |Method to recursively rebuild the whole nested set tree. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::rebuildPath/11.1|rebuildPath]] | |[[JTableNested::rebuildPath/11.1|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. | |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 | ||
|[[JTableNested::saveorder/11.1|saveorder]] | |[[JTableNested::saveorder/11.1|saveorder]] | ||
|Method to update order of table rows. | |Method to update order of table rows. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::setLocation/11.1|setLocation]] | |[[JTableNested::setLocation/11.1|setLocation]] | ||
|Method to set the location of a node in the tree object. | |Method to set the location of a node in the tree object. | ||
|- | |- | ||
| + | |public | ||
|[[JTableNested::store/11.1|store]] | |[[JTableNested::store/11.1|store]] | ||
|Method to store a node in the database table. | |Method to store a node in the database table. | ||
|- | |- | ||
| + | |protected | ||
|[[JTableNested::_getNode/11.1|_getNode]] | |[[JTableNested::_getNode/11.1|_getNode]] | ||
|Method to get nested set properties for a node in the tree. | |Method to get nested set properties for a node in the tree. | ||
|- | |- | ||
| + | |protected | ||
|[[JTableNested::_getTreeRepositionData/11.1|_getTreeRepositionData]] | |[[JTableNested::_getTreeRepositionData/11.1|_getTreeRepositionData]] | ||
|Method to get various data necessary to make room in the tree at a location for a node and its children. | |Method to get various data necessary to make room in the tree at a location for a node and its children. | ||
|- | |- | ||
| + | |protected | ||
|[[JTableNested::_logtable/11.1|_logtable]] | |[[JTableNested::_logtable/11.1|_logtable]] | ||
| | | | ||
|- | |- | ||
| + | |protected | ||
|[[JTableNested::_runQuery/11.1|_runQuery]] | |[[JTableNested::_runQuery/11.1|_runQuery]] | ||
| | | | ||
|- | |- | ||
|} | |} | ||
| + | * '''Defined in''' libraries/joomla/database/tablenested.php | ||
| + | * '''Extends''' [[JTable/11.1|JTable]] | ||
| + | * '''Extended by''' | ||
| + | ** [[JTableAsset/11.1|JTableAsset]] | ||
| + | ** [[JTableCategory/11.1|JTableCategory]] | ||
| + | ** [[JTableMenu/11.1|JTableMenu]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.database.tablenested' );</source> | <source lang="php">jimport( 'joomla.database.tablenested' );</source> | ||
===See also=== | ===See also=== | ||
| − | * [[JTableNested|Other versions of | + | * {{JVer|11.1}} '''JTableNested source code''' on [[jplatform:database/tablenested.php|BitBucket]] |
| + | * {{JVer|11.1}} Subpackage [[Subpackage Database/11.1|Database]] | ||
| + | * [[JTableNested|Other versions of JTableNested]] | ||
{{SeeAlso:JTableNested}} | {{SeeAlso:JTableNested}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JTableNested|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JTableNested|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
| − | === | + | ===User contributed notes=== |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 100: | Line 122: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
| + | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
| − | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JTableNested]]</noinclude> | + | <noinclude>[[Category:Platform JClasses]][[Category:Platform 11.1]][[Category:JTableNested]]</noinclude> |
Revision as of 14:05, 29 August 2012
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
JTableNested
Description
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. [Edit Descripton]
Methods
| 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 |
- Defined in libraries/joomla/database/tablenested.php
- Extends JTable
- Extended by
Importing
jimport( 'joomla.database.tablenested' );
See also
-
JTableNested source code on BitBucket
-
Subpackage Database
- Other versions of JTableNested
SeeAlso:JTableNested [Edit See Also]
User contributed notes
<CodeExamplesForm />
