class JTableUsergroup extends JTable


Located at : UKNOWVA_ROOT/libraries/joomla/database/table/usergroup.php

Usergroup table class.

Methods

__construct(object $db)

Constructor

string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
mixed
getFields()

Get the columns from database table.

from JTable
static mixed
getInstance(string $type, string $prefix = 'JTable', array $config = array())

Static method to get an instance of a JTable class if it can be found in the table include paths. To add include paths for searching for JTable classes see JTable::addIncludePath().

from JTable
static array
addIncludePath(mixed $path = null)

Add a filesystem path where JTable should search for table class files.

from JTable
string
getTableName()

Method to get the database table name for the class.

from JTable
string
getKeyName()

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

from JTable
object
getDbo()

Method to get the JDatabase connector object.

from JTable
boolean
setDBO(object $db)

Method to set the JDatabase connector object.

from JTable
setRules(mixed $input)

Method to set rules for the record.

from JTable
getRules()

Method to get the rules for the record.

from JTable
void
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.

from JTable
boolean
bind(mixed $src, mixed $ignore = array())

Method to bind an associative array or object to the JTable instance.This method only binds properties that are publicly accessible and optionally takes an array of properties to ignore when binding.

from JTable
boolean
load(mixed $keys = null, boolean $reset = true)

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

from JTable
boolean
check()

Method to check the current record to save

boolean
store(boolean $updateNulls = false)

Inserts a new row if id is zero or updates an existing row in the database table

boolean
save(mixed $src, string $orderingFilter = '', mixed $ignore = '')

Method to provide a shortcut to binding, checking and storing a JTable instance to the database table. The method will check a row in once the data has been stored and if an ordering filter is present will attempt to reorder the table rows based on the filter. The ordering filter is an instance property name. The rows that will be reordered are those whose value matches the JTable instance for the property specified.

from JTable
boolean
delete(integer $oid = null)

Delete this object and its dependancies

boolean
checkOut(integer $userId, mixed $pk = null)

Method to check a row out if the necessary properties/fields exist. To prevent race conditions while editing rows in a database, a row can be checked out if the fields 'checkedout' and 'checkedout_time' are available.

from JTable
boolean
checkIn(mixed $pk = null)

Method to check a row in if the necessary properties/fields exist. Checking a row in will allow other users the ability to edit the row.

from JTable
boolean
hit(mixed $pk = null)

Method to increment the hits for a row if the necessary property/field exists.

from JTable
boolean
isCheckedOut(integer $with, integer $against = null)

Method to determine if a row is checked out and therefore uneditable by a user. If the row is checked out by the same user, then it is considered not checked out -- as the user can still edit it.

from JTable
mixed
getNextOrder(string $where = '')

Method to get the next ordering value for a group of rows defined by an SQL WHERE clause.

from JTable
mixed
reorder(string $where = '')

Method to compact the ordering values of rows in a group of rows defined by an SQL WHERE clause.

from JTable
mixed
move(integer $delta, string $where = '')

Method to move a row in the ordering sequence of a group of rows defined by an SQL WHERE clause.

from JTable
boolean
publish($pks = null, $state = 1, $userId)

Method to set the publishing state for a row or list of rows in the database table. The method respects checked out rows by other users and will attempt to checkin rows that it can after adjustments are made.

from JTable
boolean
canDelete(mixed $pk = null, array $joins = null) deprecated

Generic check for whether dependancies exist for this object in the database schema

from JTable
string
toXML(boolean $mapKeysToText = false) deprecated

Method to export the JTable instance properties to an XML string.

from JTable
getErrorMsg()

No description

from JTable
boolean
rebuild(integer $parent_id, integer $left)

Method to recursively rebuild the nested set tree.

Details

at line 32
JObject __construct(object $db)

Constructor

Parameters

object $db JDatabase connector object.

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JTable at line 126
mixed getFields()

Get the columns from database table.

Return Value

mixed An array of the field names, or false if an error occurs.

in JTable at line 158
static mixed getInstance(string $type, string $prefix = 'JTable', array $config = array())

Static method to get an instance of a JTable class if it can be found in the table include paths. To add include paths for searching for JTable classes see JTable::addIncludePath().

Parameters

string $type The type (name) of the JTable class to get an instance of.
string $prefix An optional prefix for the table class name.
array $config An optional array of configuration values for the JTable object.

Return Value

mixed A JTable object if found or boolean false if one could not be found.

in JTable at line 204
static array addIncludePath(mixed $path = null)

Add a filesystem path where JTable should search for table class files.

You may either pass a string or an array of paths.

Parameters

mixed $path A filesystem path or array of filesystem paths to add.

Return Value

array An array of filesystem paths to find JTable classes in.

in JTable at line 297
string getTableName()

Method to get the database table name for the class.

Return Value

string The name of the database table being modeled.

in JTable at line 310
string getKeyName()

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

Return Value

string The name of the primary key for the table.

in JTable at line 323
object getDbo()

Method to get the JDatabase connector object.

Return Value

object The internal database connector object.

in JTable at line 338
boolean setDBO(object $db)

Method to set the JDatabase connector object.

Parameters

object $db &$db A JDatabase connector object to be used by the table object.

Return Value

boolean True on success.

in JTable at line 357
setRules(mixed $input)

Method to set rules for the record.

Parameters

mixed $input A JRules object, JSON string, or array.

in JTable at line 374
JRules getRules()

Method to get the rules for the record.

Return Value

JRules object

in JTable at line 389
void 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.

Return Value

void

in JTable at line 415
boolean bind(mixed $src, mixed $ignore = array())

Method to bind an associative array or object to the JTable instance.This method only binds properties that are publicly accessible and optionally takes an array of properties to ignore when binding.

Parameters

mixed $src An associative array or object to bind to the JTable instance.
mixed $ignore An optional array or space separated list of properties to ignore while binding.

Return Value

boolean True on success.

in JTable at line 461
boolean load(mixed $keys = null, boolean $reset = true)

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

Parameters

mixed $keys 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.
boolean $reset True to reset the default values before loading the new row.

Return Value

boolean True if successful. False if row not found or on error (internal error state set in that case).

at line 44
boolean check()

Method to check the current record to save

Return Value

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

at line 134
boolean store(boolean $updateNulls = false)

Inserts a new row if id is zero or updates an existing row in the database table

Parameters

boolean $updateNulls True to update fields even if they are null.

Return Value

boolean True on success.

in JTable at line 672
boolean save(mixed $src, string $orderingFilter = '', mixed $ignore = '')

Method to provide a shortcut to binding, checking and storing a JTable instance to the database table. The method will check a row in once the data has been stored and if an ordering filter is present will attempt to reorder the table rows based on the filter. The ordering filter is an instance property name. The rows that will be reordered are those whose value matches the JTable instance for the property specified.

Parameters

mixed $src An associative array or object to bind to the JTable instance.
string $orderingFilter Filter for the order updating
mixed $ignore An optional array or space separated list of properties to ignore while binding.

Return Value

boolean True on success.

at line 153
boolean delete(integer $oid = null)

Delete this object and its dependancies

Parameters

integer $oid The primary key of the user group to delete.

Return Value

boolean True on success.

in JTable at line 783
boolean checkOut(integer $userId, mixed $pk = null)

Method to check a row out if the necessary properties/fields exist. To prevent race conditions while editing rows in a database, a row can be checked out if the fields 'checkedout' and 'checkedout_time' are available.

While a row is checked out, any attempt to store the row by a user other than the one who checked the row out should be held until the row is checked in again.

Parameters

integer $userId The Id of the user checking out the row.
mixed $pk An optional primary key value to check out. If not set the instance property value is used.

Return Value

boolean True on success.

in JTable at line 837
boolean checkIn(mixed $pk = null)

Method to check a row in if the necessary properties/fields exist. Checking a row in will allow other users the ability to edit the row.

Parameters

mixed $pk An optional primary key value to check out. If not set the instance property value is used.

Return Value

boolean True on success.

in JTable at line 888
boolean hit(mixed $pk = null)

Method to increment the hits for a row if the necessary property/field exists.

Parameters

mixed $pk An optional primary key value to increment. If not set the instance property value is used.

Return Value

boolean True on success.

in JTable at line 940
boolean isCheckedOut(integer $with, integer $against = null)

Method to determine if a row is checked out and therefore uneditable by a user. If the row is checked out by the same user, then it is considered not checked out -- as the user can still edit it.

Parameters

integer $with The userid to preform the match with, if an item is checked out by this user the function will return false.
integer $against The userid to perform the match against when the function is used as a static function.

Return Value

boolean True if checked out.

in JTable at line 975
mixed getNextOrder(string $where = '')

Method to get the next ordering value for a group of rows defined by an SQL WHERE clause.

This is useful for placing a new item last in a group of items in the table.

Parameters

string $where WHERE clause to use for selecting the MAX(ordering) for the table.

Return Value

mixed Boolean false an failure or the next ordering value as an integer.

in JTable at line 1022
mixed reorder(string $where = '')

Method to compact the ordering values of rows in a group of rows defined by an SQL WHERE clause.

Parameters

string $where WHERE clause to use for limiting the selection of rows to compact the ordering values.

Return Value

mixed Boolean true on success.

in JTable at line 1102
mixed move(integer $delta, string $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.

Parameters

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.

Return Value

mixed Boolean true on success.

in JTable at line 1215
boolean publish($pks = null, $state = 1, $userId)

Method to set the publishing state for a row or list of rows in the database table. The method respects checked out rows by other users and will attempt to checkin rows that it can after adjustments are made.

Parameters

$pks
$state
$userId

Return Value

boolean True on success.

in JTable at line 1300
boolean canDelete(mixed $pk = null, array $joins = null) deprecated

deprecated 12.1

Generic check for whether dependancies exist for this object in the database schema

Can be overloaded/supplemented by the child class

Parameters

mixed $pk An optional primary key value check the row for. If not set the instance property value is used.
array $joins An optional array to compiles standard joins formatted like: [label => 'Label', name => 'table name' , idfield => 'field', joinfield => 'field']

Return Value

boolean True on success.

in JTable at line 1376
string toXML(boolean $mapKeysToText = false) deprecated

deprecated 12.1

Method to export the JTable instance properties to an XML string.

Parameters

boolean $mapKeysToText True to map foreign keys to text values.

Return Value

string XML string representation of the instance.

in JTable at line 1453
getErrorMsg()

at line 81
boolean rebuild(integer $parent_id, integer $left)

Method to recursively rebuild the nested set tree.

Parameters

integer $parent_id The root of the tree to rebuild.
integer $left The left id to start with in building the tree.

Return Value

boolean True on success