Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de l'interface TableInterface
+ Graphe d'héritage de TableInterface:

Fonctions membres publiques

 bind ($src, $ignore=array())
 
 check ()
 
 delete ($pk=null)
 
 getDbo ()
 
 getKeyName ()
 
 load ($keys=null, $reset=true)
 
 reset ()
 
 store ($updateNulls=false)
 
 getId ()
 
 hasField ($key)
 

Description détaillée

Table class interface.

Depuis
3.2

Documentation des fonctions membres

◆ bind()

bind (   $src,
  $ignore = array() 
)

Method to bind an associative array or object to the TableInterface instance.

This method only binds properties that are publicly accessible and optionally takes an array of properties to ignore when binding.

Paramètres
mixed$srcAn associative array or object to bind to the TableInterface instance.
mixed$ignoreAn optional array or space separated list of properties to ignore while binding.
Renvoie
boolean True on success.
Depuis
3.2
Exceptions

Implémenté dans Table, WorkflowTable, StageTable, Category, Module, TaskTable, BannerTable, User, Content, TransitionTable, FieldTable, GroupTable, Menu, StyleTable, et ViewLevel.

◆ check()

check ( )

Method to perform sanity checks on the TableInterface instance properties to ensure they are safe to store in the database.

Implementations of this interface should use this method to make sure the data they are storing in the database is safe and as expected before storage.

Renvoie
boolean True if the instance is sane and able to be stored in the database.
Depuis
3.2

Implémenté dans Table, Nested, Content, User, Category, ContactTable, FieldTable, Module, WorkflowTable, StageTable, Menu, TaskTable, GroupTable, NoteTable, Asset, BannerTable, StyleTable, ClientTable, Extension, FilterTable, CoreContent, NewsfeedTable, TagTable, ViewLevel, MenuTable, Update, MapTable, MessageTable, LinkTable, MenuType, UpdateSite, Usergroup, ContentType, et Language.

◆ delete()

delete (   $pk = null)

Method to delete a record.

Paramètres
mixed$pkAn optional primary key value to delete. If not set the instance property value is used.
Renvoie
boolean True on success.
Depuis
3.2
Exceptions

Implémenté dans User, Usergroup, MfaTable, MenuType, CoreContent, StyleTable, WorkflowTable, et StageTable.

◆ getDbo()

getDbo ( )

Method to get the DatabaseDriver object.

Renvoie
DatabaseDriver The internal database driver object.
Depuis
3.2

Implémenté dans Table.

Référencé par TagsHelper\addTagMapping().

◆ getId()

getId ( )

Returns the identity (primary key) value of this record

Renvoie
mixed
Depuis
4.0.0

Implémenté dans Table.

◆ getKeyName()

getKeyName ( )

Method to get the primary key field name for the table.

Renvoie
string The name of the primary key for the table.
Depuis
3.2

Référencé par TagsHelper\addTagMapping(), et TagsHelper\unTagItem().

◆ hasField()

hasField (   $key)

Check if the record has a property (applying a column alias if it exists)

Paramètres
string$keykey to be checked
Renvoie
boolean
Depuis
4.0.0

Implémenté dans Table.

Référencé par PlgWorkflowFeaturing\isSupported(), et PlgWorkflowPublishing\isSupported().

◆ load()

load (   $keys = null,
  $reset = true 
)

Method to load a row from the database by primary key and bind the fields to the TableInterface instance properties.

Paramètres
mixed$keysAn optional primary key value to load the row by, or an array of fields to match. If not set the instance property value is used.
boolean$resetTrue to reset the default values before loading the new row.
Renvoie
boolean True if successful. False if row not found.
Depuis
3.2
Exceptions

Implémenté dans Table, MfaTable, et User.

◆ reset()

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.

Renvoie
void
Depuis
3.2

Implémenté dans Nested, et Table.

Référencé par TagsHelper\postStoreProcess(), et TagsHelper\preStoreProcess().

◆ store()

store (   $updateNulls = false)

Method to store a row in the database from the TableInterface instance properties.

If a primary key value is set the row with that primary key value will be updated with the instance property values. If no primary key value is set a new row will be inserted into the database with the properties from the TableInterface instance.

Paramètres
boolean$updateNullsTrue to update fields even if they are null.
Renvoie
boolean True on success.
Depuis
3.2

Implémenté dans Nested, User, Content, Category, CoreContent, FieldTable, Module, Usergroup, StageTable, WorkflowTable, Menu, TagTable, GroupTable, NewsfeedTable, TaskTable, LinkTable, FilterTable, MenuType, StyleTable, MfaTable, ContactTable, ContentHistory, ContentType, Language, RequestTable, NoteTable, LinkTable, et ConsentTable.


La documentation de cette interface a été générée à partir du fichier suivant :