TaggableTableInterface
Extends TableInterfaceInterface for a taggable Table class
since |
3.10.0 |
---|---|
package |
Joomla CMS |
Methods
bind
Method to bind an associative array or object to the TableInterface instance.
bind( src, ignore = []) :
This method only binds properties that are publicly accessible and optionally takes an array of properties to ignore when binding.
since |
3.2 |
---|---|
throws |
|
Arguments
- src
mixed
An associative array or object to bind to the TableInterface instance.- ignore
mixed
An optional array or space separated list of properties to ignore while binding.
Response
bool
True on success.
check
Method to perform sanity checks on the TableInterface instance properties to ensure they are safe to store in the database.
check() :
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.
since |
3.2 |
---|
Response
bool
True if the instance is sane and able to be stored in the database.
clearTagsHelper
Clears a set tags helper
clearTagsHelper() :
since |
4.0.0 |
---|
Response
void
delete
Method to delete a record.
delete( pk = null) :
since |
3.2 |
---|---|
throws |
|
Arguments
- pk
mixed
An optional primary key value to delete. If not set the instance property value is used.
Response
bool
True on success.
getDbo
Method to get the DatabaseDriver object.
getDbo() : \Joomla\Database\DatabaseDriver
since |
3.2 |
---|
Response
DatabaseDriver
The internal database driver object.
getId
Returns the identity (primary key) value of this record
getId() :
since |
4.0.0 |
---|
Response
mixed
getKeyName
Method to get the primary key field name for the table.
getKeyName() :
since |
3.2 |
---|
Response
string
The name of the primary key for the table.
getTagsHelper
Get the tags helper
getTagsHelper() : \Joomla\CMS\Helper\TagsHelper
getTypeAlias
Get the type alias for the tags mapping table
getTypeAlias() :
The type alias generally is the internal component name with the content type. Ex.: com_content.article
since |
4.0.0 |
---|
Response
string
The alias as described above
hasField
Check if the record has a property (applying a column alias if it exists)
hasField( key) :
since |
4.0.0 |
---|
Arguments
- key
string
key to be checked
Response
bool
load
Method to load a row from the database by primary key and bind the fields to the TableInterface instance properties.
load( keys = null, reset = true) :
since |
3.2 |
---|---|
throws |
|
Arguments
- keys
mixed
An 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.- reset
bool
True to reset the default values before loading the new row.
Response
bool
True if successful. False if row not found.
reset
Method to reset class properties to the defaults set in the class definition.
reset() :
It will ignore the primary key as well as any private class properties.
since |
3.2 |
---|
Response
void
setTagsHelper
Set the tags helper
setTagsHelper(\Joomla\CMS\Helper\TagsHelper tagsHelper) :
store
Method to store a row in the database from the TableInterface instance properties.
store( updateNulls = false) :
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.
since |
3.2 |
---|
Arguments
- updateNulls
bool
True to update fields even if they are null.
Response
bool
True on success.