|
|
| (12 intermediate revisions by 5 users not shown) |
| Line 1: |
Line 1: |
| − | '''JTable''' is an abstract class which provides a number of methods to handle database tables. Some of the methods listed will be overridden by the child class so you should check the child class documentation for further information.
| + | This class is available in the following Joomla versions:- |
| − | | + | <splist showpath=notparent /> |
| − | ===Defined in===
| + | <noinclude>[[Category:Platform JClasses]][[Category:JTable]]</noinclude> |
| − | /joomla/database/table.php
| + | |
| − | | + | |
| − | ===Extends===
| + | |
| − | * [[JObject]]
| + | |
| − | | + | |
| − | ===Extended by===
| + | |
| − | * [[JTableMenuTypes]]
| + | |
| − | * [[JTableContent]]
| + | |
| − | * [[JTableCategory]]
| + | |
| − | * [[JTableAROGroup]]
| + | |
| − | * [[JTablePlugin]]
| + | |
| − | * [[JTableUser]]
| + | |
| − | * [[JTableARO]]
| + | |
| − | * [[JTableComponent]]
| + | |
| − | * [[JTableSession]]
| + | |
| − | * [[JTableMenu]]
| + | |
| − | * [[JTableSection]]
| + | |
| − | * [[JTableModule]]
| + | |
| − | | + | |
| − | ===Get and Set Methods===
| + | |
| − | Properties which do not have specific get or set methods listed here can be retrieved or set using the inherited [[JObject/get|JObject->get]] method.
| + | |
| − | {| class="wikitable"
| + | |
| − | |-
| + | |
| − | !Get method
| + | |
| − | !Set method
| + | |
| − | !Description
| + | |
| − | !Property
| + | |
| − | |-
| + | |
| − | |[[JTable/getDBO|getDBO]]
| + | |
| − | |[[JTable/setDBO|setDBO]]
| + | |
| − | |Method to set/get the Database Object used for all table transactions
| + | |
| − | |$_db
| + | |
| − | |-
| + | |
| − | |[[JTable/getTableName|getTableName]]
| + | |
| − | |
| + | |
| − | |Method to get the name of the database table, that is being representent by the table-object
| + | |
| − | |$_tbl
| + | |
| − | |-
| + | |
| − | |[[JTable/getKeyName|getTableKey]]
| + | |
| − | |
| + | |
| − | |Method to get the name of the primary key of the table
| + | |
| − | |$_tbl_key
| + | |
| − | |}
| + | |
| − | | + | |
| − | ===Other Methods===
| + | |
| − | {| class="wikitable"
| + | |
| − | |-
| + | |
| − | !Method name
| + | |
| − | !Description
| + | |
| − | |-
| + | |
| − | |[[JTable/addIncludePath|addIncludePath]]
| + | |
| − | |Add a directory where JTable should search for table types. You may either pass a string or an array of directories.
| + | |
| − | |-
| + | |
| − | |[[JTable/bind|bind]]
| + | |
| − | |Binds a named array/hash to this object
| + | |
| − | |-
| + | |
| − | |[[JTable/canDelete|canDelete]]
| + | |
| − | |Generic check for whether dependancies exist for this object in the db schema
| + | |
| − | |-
| + | |
| − | |[[JTable/check|check]]
| + | |
| − | |Generic check method
| + | |
| − | |-
| + | |
| − | |[[JTable/checkin|checkin]]
| + | |
| − | |Checks in a row
| + | |
| − | |-
| + | |
| − | |[[JTable/checkout|checkout]]
| + | |
| − | |Checks out a row
| + | |
| − | |-
| + | |
| − | |[[JTable/delete|delete]]
| + | |
| − | |Default delete method
| + | |
| − | |-
| + | |
| − | |[[JTable/getInstance|getInstance]]
| + | |
| − | |Returns a reference to the a Table object, always creating it
| + | |
| − | |-
| + | |
| − | |[[JTable/getNextOrder|getNextOrder]]
| + | |
| − | |Returns the ordering value to place a new item last in its group
| + | |
| − | |-
| + | |
| − | |[[JTable/hit|hit]]
| + | |
| − | |
| + | |
| − | |-
| + | |
| − | |[[JTable/isCheckedOut|isCheckedOut]]
| + | |
| − | |Check if an item is checked out
| + | |
| − | |-
| + | |
| − | |[[JTable/load|load]]
| + | |
| − | |Loads a row from the database and binds the fields to the object properties
| + | |
| − | |-
| + | |
| − | |[[JTable/move|move]]
| + | |
| − | |
| + | |
| − | |-
| + | |
| − | |[[JTable/publish|publish]]
| + | |
| − | |Generic Publish/Unpublish function
| + | |
| − | |-
| + | |
| − | |[[JTable/reorder|reorder]]
| + | |
| − | |Compacts the ordering sequence of the selected records
| + | |
| − | |-
| + | |
| − | |[[JTable/reset|reset]]
| + | |
| − | |Resets the default properties
| + | |
| − | |-
| + | |
| − | |[[JTable/save|save]]
| + | |
| − | |Generic save function
| + | |
| − | |-
| + | |
| − | |[[JTable/store|store]]
| + | |
| − | |Inserts a new row if id is zero or updates an existing row in the database table
| + | |
| − | |-
| + | |
| − | |[[JTable/toXML|toXML]]
| + | |
| − | |Export item list to xml
| + | |
| − | |}
| + | |
| − | ===Importing===
| + | |
| − | <source lang="php">jimport( 'joomla.document.document' );</source> | + | |
| − | | + | |
| − | ===Adding support for new document types===
| + | |
| − | New document types are added by creating a new sub-directory under the /libraries/joomla/document/ directory with the same name as the type. For example, to add a document type called "mytype", you would create the directory /libraries/joomla/document/mytype. In this directory you must then create a file called mytype.php which will contain the class definition for JDocumentMytype which extends JDocument. Look at the code for existing document types to see what needs to be done.
| + | |
| − | ===See also===
| + | |
| − | * [http://api.joomla.org/Joomla-Framework/Document/JDocument.html JDocument on api.joomla.org]
| + | |
| − | * [[JDocumentRenderer]]
| + | |
| − | <noinclude>[[Category:Development]][[Category:Framework]][[Category:JDocument]]</noinclude> | + | |