Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
debug ($level) | |
getPath ($pk=null, $diagnostic=false) | |
getTree ($pk=null, $diagnostic=false) | |
isLeaf ($pk=null) | |
setLocation ($referenceId, $position='after') | |
move ($delta, $where='') | |
moveByReference ($referenceId, $position='after', $pk=null, $recursiveUpdate=true) | |
delete ($pk=null, $children=true) | |
check () | |
store ($updateNulls=false) | |
publish ($pks=null, $state=1, $userId=0) | |
orderUp ($pk) | |
orderDown ($pk) | |
getRootId () | |
rebuild ($parentId=null, $leftId=0, $level=0, $path='') | |
rebuildPath ($pk=null) | |
reset () | |
saveorder ($idArray=null, $lftArray=null) | |
Fonctions membres publiques hérités de Table | |
__construct ($table, $key, $db) | |
attachObserver (\JObserverInterface $observer) | |
getObserverOfClass ($observerClass) | |
getFields ($reload=false) | |
appendPrimaryKeys ($query, $pk=null) | |
getTableName () | |
getKeyName ($multiple=false) | |
getDbo () | |
setDbo ($db) | |
setRules ($input) | |
getRules () | |
reset () | |
bind ($src, $ignore=array()) | |
load ($keys=null, $reset=true) | |
check () | |
save ($src, $orderingFilter='', $ignore='') | |
checkOut ($userId, $pk=null) | |
checkIn ($pk=null) | |
hasPrimaryKey () | |
hit ($pk=null) | |
isCheckedOut ($with=0, $against=null) | |
getNextOrder ($where='') | |
getPrimaryKey (array $keys=array()) | |
reorder ($where='') | |
move ($delta, $where='') | |
publish ($pks=null, $state=1, $userId=0) | |
getColumnAlias ($column) | |
setColumnAlias ($column, $columnAlias) | |
hasField ($key) | |
Fonctions membres publiques hérités de JObservableInterface | |
attachObserver (JObserverInterface $observer) | |
Champs de données | |
$parent_id | |
$level | |
$lft | |
$rgt | |
$alias | |
Fonctions membres protégées | |
recursiveUpdatePublishedColumn ($pk, $newState=null) | |
_getNode ($id, $key=null) | |
_getTreeRepositionData ($referenceNode, $nodeWidth, $position='before') | |
_logtable ($showData=true, $showQuery=true) | |
_runQuery ($query, $errorMessage) | |
Fonctions membres protégées hérités de Table | |
_getAssetName () | |
_getAssetTitle () | |
_lock () | |
_unlock () | |
Attributs protégés | |
$_location | |
$_location_id | |
$_cache = array() | |
$_debug = 0 | |
Attributs protégés hérités de Table | |
$_tbl = '' | |
$_tbl_key = '' | |
$_tbl_keys = array() | |
$_db | |
$_trackAssets = false | |
$_rules | |
$_locked = false | |
$_autoincrement = true | |
$_observers | |
$_columnAlias = array() | |
$_jsonEncode = array() | |
$_supportNullValue = false | |
Attributs protégés statiques | |
static | $root_id = 0 |
Attributs privés | |
$_validLocations = array('before', 'after', 'first-child', 'last-child') | |
Membres hérités additionnels | |
Fonctions membres publiques statiques hérités de Table | |
static | getInstance ($type, $prefix='JTable', $config=array()) |
static | addIncludePath ($path=null) |
Table class supporting modified pre-order tree traversal behavior.
|
protected |
Method to get nested set properties for a node in the tree.
integer | $id | Value to look up the node by. |
string | $key | An optional key to look up the node by (parent | left | right). If omitted, the primary key of the table is used. |
|
protected |
Method to get various data necessary to make room in the tree at a location for a node and its children. The returned data object includes conditions for SQL WHERE clauses for updating left and right id values to make room for the node as well as the new left and right ids for the node.
object | $referenceNode | A node object with at least a 'lft' and 'rgt' with which to make room in the tree around for a new node. |
integer | $nodeWidth | The width of the node for which to make room in the tree. |
string | $position | The position relative to the reference node where the room should be made. |
Method to create a log table in the buffer optionally showing the query and/or data.
boolean | $showData | True to show data |
boolean | $showQuery | True to show query |
Références $buffer, $query, $row, $rows, ENT_QUOTES, et htmlspecialchars.
|
protected |
Runs a query and unlocks the database on an error.
mixed | $query | A string or object. |
string | $errorMessage | Unused. |
Références $query.
check | ( | ) |
Checks that the object is valid and able to be stored.
This method checks that the parent_id is non-zero and exists in the database. Note that the root node (parent_id = 0) cannot be manipulated with this class.
Références $query.
debug | ( | $level | ) |
Sets the debug level on or off
integer | $level | 0 = off, 1 = on |
Method to delete a node and, optionally, its child nodes from the table.
integer | $pk | The primary key of the node to delete. |
boolean | $children | True to delete child nodes, false to move them up a level. |
Références $asset, $name, $query, Table\getInstance(), et null.
Method to get an array of nodes from a given node to its root.
integer | $pk | Primary key of the node for which to get the path. |
boolean | $diagnostic | Only select diagnostic data for the nested sets. |
Références $query.
getRootId | ( | ) |
Method to get a node and all its child nodes.
integer | $pk | Primary key of the node for which to get the tree. |
boolean | $diagnostic | Only select diagnostic data for the nested sets. |
Références $query.
isLeaf | ( | $pk = null | ) |
Method to determine if a node is a leaf node in the tree (has no children).
integer | $pk | Primary key of the node to check. |
move | ( | $delta, | |
$where = '' |
|||
) |
Method to move a row in the ordering sequence of a group of rows defined by an SQL WHERE clause. Negative numbers move the row up in the sequence and positive numbers move it down.
integer | $delta | The direction and magnitude to move the row in the ordering sequence. |
string | $where | WHERE clause to use for limiting the selection of rows to compact the ordering values. |
Method to move a node and its children to a new location in the tree.
integer | $referenceId | The primary key of the node to reference new location by. |
string | $position | Location type string. ['before', 'after', 'first-child', 'last-child'] |
integer | $pk | The primary key of the node to move. |
boolean | $recursiveUpdate | Flag indicate that method recursiveUpdatePublishedColumn should be call. |
Références $fields, $offset, $position, $query, null, et title.
orderDown | ( | $pk | ) |
Method to move a node one position to the right in the same level.
integer | $pk | Primary key of the node to move. |
Références $query.
orderUp | ( | $pk | ) |
Method to move a node one position to the left in the same level.
integer | $pk | Primary key of the node to move. |
Références $query.
publish | ( | $pks = null , |
|
$state = 1 , |
|||
$userId = 0 |
|||
) |
Method to set the publishing state for a node or list of nodes in the database table. The method respects rows checked out by other users and will attempt to checkin rows that it can after adjustments are made. The method will not allow you to set a publishing state higher than any ancestor node and will not allow you to set a publishing state on a node with a checked out child.
mixed | $pks | An optional array of primary key values to update. If not set the instance property value is used. |
integer | $state | The publishing state. eg. [0 = unpublished, 1 = published] |
integer | $userId | The user id of the user performing the operation. |
Références $key, $published, $query, $state, $userId, et ArrayHelper\toInteger().
rebuild | ( | $parentId = null , |
|
$leftId = 0 , |
|||
$level = 0 , |
|||
$path = '' |
|||
) |
Method to recursively rebuild the whole nested set tree.
integer | $parentId | The root of the tree to rebuild. |
integer | $leftId | The left id to start with in building the tree. |
integer | $level | The level to assign to the current nodes. |
string | $path | The path to the current nodes. |
rebuildPath | ( | $pk = null | ) |
|
protected |
Method to recursive update published column for children rows.
integer | $pk | Id number of row which published column was changed. |
integer | $newState | An optional value for published column of row identified by $pk. |
We have to calculate the correct value for c2.published based on p2.published and own c2.published column, where (p2) is parent category is and (c2) current category
p2.published <= c2.published AND p2.published > 0 THEN c2.published 2 <= 2 THEN 2 (If archived in archived then archived) 1 <= 2 THEN 2 (If archived in published then archived) 1 <= 1 THEN 1 (If published in published then published)
p2.published > c2.published AND c2.published > 0 THEN p2.published 2 > 1 THEN 2 (If published in archived then archived)
p2.published > c2.published THEN c2.published ELSE p2.published 2 > -2 THEN -2 (If trashed in archived then trashed) 2 > 0 THEN 0 (If unpublished in archived then unpublished) 1 > 0 THEN 0 (If unpublished in published then unpublished) 0 > -2 THEN -2 (If trashed in unpublished then trashed) ELSE 0 <= 2 THEN 0 (If archived in unpublished then unpublished) 0 <= 1 THEN 0 (If published in unpublished then unpublished) 0 <= 0 THEN 0 (If unpublished in unpublished then unpublished) -2 <= -2 THEN -2 (If trashed in trashed then trashed) -2 <= 0 THEN -2 (If unpublished in trashed then trashed) -2 <= 1 THEN -2 (If published in trashed then trashed) -2 <= 2 THEN -2 (If archived in trashed then trashed)
Références $key, $published, $query, et null.
reset | ( | ) |
Method to reset class properties to the defaults set in the class definition. It will ignore the primary key as well as any private class properties (except $_errors).
setLocation | ( | $referenceId, | |
$position = 'after' |
|||
) |
Method to set the location of a node in the tree object. This method does not save the new location to the database, but will set it in the object so that when the node is stored it will be stored in the new location.
integer | $referenceId | The primary key of the node to reference new location by. |
string | $position | Location type string. |
Références $position.
store | ( | $updateNulls = false | ) |
Method to store a node in the database table.
boolean | $updateNulls | True to update null values as well. |
Références $query.
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
$alias |
$level |
$lft |
$parent_id |
$rgt |
|
staticprotected |