TYPO3 API  SVNRelease
Public Member Functions | Public Attributes | Protected Attributes
t3lib_loadDBGroup Class Reference
Inheritance diagram for t3lib_loadDBGroup:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 start ($itemlist, $tablelist, $MMtable= '', $MMuid=0, $currentTable= '', $conf=array())
 setUpdateReferenceIndex ($updateReferenceIndex)
 readList ($itemlist)
 sortList ($sortby)
 readMM ($tableName, $uid)
 writeMM ($MM_tableName, $uid, $prependTableName=0)
 remapMM ($MM_tableName, $uid, $newUid, $prependTableName=0)
 readForeignField ($uid, $conf)
 writeForeignField ($conf, $parentUid, $updateToUid=0, $skipSorting=FALSE)
 getValueArray ($prependTableName= '')
 convertPosNeg ($valueArray, $fTable, $nfTable)
 getFromDB ()
 readyForInterface ()
 countItems ($returnAsArray=TRUE)
 isOnSymmetricSide ($parentUid, $parentConf, $childRec)

Public Attributes

 $fromTC = 1
 $registerNonTableValues = 0
 $tableArray = Array()
 $itemArray = Array()
 $nonTableArray = array()
 $additionalWhere = array()
 $checkIfDeleted = 1
 $dbPaths = Array()
 $firstTable = ''
 $secondTable = ''
 $MM_is_foreign = 0
 $MM_oppositeField = ''
 $MM_oppositeTable = ''
 $MM_oppositeFieldConf = ''
 $MM_isMultiTableRelationship = 0
 $currentTable
 $undeleteRecord
 $MM_match_fields = array()
 $MM_insert_fields = array()
 $MM_table_where = ''

Protected Attributes

 $updateReferenceIndex = TRUE

Detailed Description

Definition at line 68 of file class.t3lib_loaddbgroup.php.


Member Function Documentation

t3lib_loadDBGroup::convertPosNeg ( valueArray,
fTable,
nfTable 
)

Converts id numbers from negative to positive.

Parameters:
arrayArray of [table]_[id] pairs.
stringForeign table (the one used for positive numbers)
stringNEGative foreign table
Returns:
array The array with ID integer values, converted to positive for those where the table name was set but did NOT match the positive foreign table.

Definition at line 747 of file class.t3lib_loaddbgroup.php.

References t3lib_div\testInt().

t3lib_loadDBGroup::countItems ( returnAsArray = TRUE)

Counts the items in $this->itemArray and puts this value in an array by default.

Parameters:
booleanWhether to put the count value in an array
Returns:
mixed The plain count as integer or the same inside an array

Definition at line 832 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::getFromDB ( )

Reads all records from internal tableArray into the internal ->results array where keys are table names and for each table, records are stored with uids as their keys. If $this->fromTC is set you can save a little memory since only uid,pid and a few other fields are selected.

Returns:
void

Definition at line 769 of file class.t3lib_loaddbgroup.php.

References $GLOBALS, $res, and $row.

t3lib_loadDBGroup::getValueArray ( prependTableName = '')

After initialization you can extract an array of the elements from the object. Use this function for that.

Parameters:
booleanIf set, then table names will ALWAYS be prepended (unless its a _NO_TABLE value)
Returns:
array A numeric array.

Definition at line 719 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::isOnSymmetricSide ( parentUid,
parentConf,
childRec 
)

Checks, if we're looking from the "other" side, the symmetric side, to a symmetric relation.

Parameters:
string$parentUid,:The uid of the parent record
array$parentConf,:The TCA configuration of the parent field embedding the child records
array$childRec,:The record row of the child record
Returns:
boolean Returns true if looking from the symmetric ("other") side to the relation.

Definition at line 865 of file class.t3lib_loaddbgroup.php.

References t3lib_div\testInt().

Referenced by t3lib_TCEforms_inline\renderForeignRecordHeader(), t3lib_TCEforms_inline\renderForeignRecordHeaderControl(), t3lib_TCEforms_inline\skipField(), and writeForeignField().

t3lib_loadDBGroup::readForeignField ( uid,
conf 
)

Reads items from a foreign_table, that has a foreign_field (uid of the parent record) and stores the parts in the internal array itemArray and tableArray.

Parameters:
integer$uid,:The uid of the parent record (this value is also on the foreign_table in the foreign_field)
array$conf,:TCA configuration for current field
Returns:
void

Definition at line 534 of file class.t3lib_loaddbgroup.php.

References $GLOBALS, $row, t3lib_BEfunc\deleteClause(), t3lib_BEfunc\getRecord(), t3lib_BEfunc\getWorkspaceWhereClause(), and t3lib_BEfunc\isTableWorkspaceEnabled().

Referenced by start().

t3lib_loadDBGroup::readList ( itemlist)

Explodes the item list and stores the parts in the internal arrays itemArray and tableArray from MM records.

Parameters:
stringItem list
Returns:
void

Definition at line 206 of file class.t3lib_loaddbgroup.php.

References t3lib_div\testInt(), and t3lib_div\trimExplode().

Referenced by start().

t3lib_loadDBGroup::readMM ( tableName,
uid 
)

Reads the record tablename/id into the internal arrays itemArray and tableArray from MM records. You can call this function after start if you supply no list to start()

Parameters:
stringMM Tablename
integerLocal UID
Returns:
void

Definition at line 284 of file class.t3lib_loaddbgroup.php.

References $additionalWhere, $GLOBALS, $res, $row, and $value.

Referenced by start().

t3lib_loadDBGroup::readyForInterface ( )

Prepare items from itemArray to be transferred to the TCEforms interface (as a comma list)

Returns:
string
See also:
t3lib_transferdata::renderRecord()

Definition at line 804 of file class.t3lib_loaddbgroup.php.

References $GLOBALS, $TCA, t3lib_div\fixed_lgd_cs(), and t3lib_BEfunc\getRecordTitle().

t3lib_loadDBGroup::remapMM ( MM_tableName,
uid,
newUid,
prependTableName = 0 
)

Remaps MM table elements from one local uid to another Does NOT update the reference index for you, must be called subsequently to do that!

Parameters:
stringMM table name
integerLocal, current UID
integerLocal, new UID
booleanIf set, then table names will always be written.
Returns:
void

Definition at line 493 of file class.t3lib_loaddbgroup.php.

References $additionalWhere, $GLOBALS, and $value.

t3lib_loadDBGroup::setUpdateReferenceIndex ( updateReferenceIndex)

Sets whether the reference index shall be updated.

Parameters:
boolean$updateReferenceIndexWhether the reference index shall be updated
Returns:
void

Definition at line 196 of file class.t3lib_loaddbgroup.php.

References $updateReferenceIndex.

t3lib_loadDBGroup::sortList ( sortby)

Does a sorting on $this->itemArray depending on a default sortby field. This is only used for automatic sorting of comma separated lists. This function is only relevant for data that is stored in comma separated lists!

Parameters:
string$sortby,:The default_sortby field/command (e.g. 'price DESC')
Returns:
void

Definition at line 252 of file class.t3lib_loaddbgroup.php.

References $GLOBALS, $res, and $row.

Referenced by start().

t3lib_loadDBGroup::start ( itemlist,
tablelist,
MMtable = '',
MMuid = 0,
currentTable = '',
conf = array() 
)

Initialization of the class.

Parameters:
stringList of group/select items
stringComma list of tables, first table takes priority if no table is set for an entry in the list.
stringName of a MM table.
integerLocal UID for MM lookup
stringcurrent table name
integerTCA configuration for current field
Returns:
void

Definition at line 112 of file class.t3lib_loaddbgroup.php.

References $currentTable, $GLOBALS, t3lib_div\loadTCA(), readForeignField(), readList(), readMM(), sortList(), and t3lib_div\trimExplode().

t3lib_loadDBGroup::writeForeignField ( conf,
parentUid,
updateToUid = 0,
skipSorting = FALSE 
)

Write the sorting values to a foreign_table, that has a foreign_field (uid of the parent record)

Parameters:
array$conf,:TCA configuration for current field
integer$parentUid,:The uid of the parent record
boolean$updateToUid,:Whether to update the foreign field with the $parentUid (on Copy)
boolean$skipSorting,:Do not update the sorting columns, this could happen for imported values
Returns:
void

Definition at line 610 of file class.t3lib_loaddbgroup.php.

References $GLOBALS, $row, t3lib_BEfunc\getRecord(), isOnSymmetricSide(), t3lib_BEfunc\isTableWorkspaceEnabled(), and t3lib_div\testInt().

Referenced by tx_version_tcemain\writeRemappedForeignField().

t3lib_loadDBGroup::writeMM ( MM_tableName,
uid,
prependTableName = 0 
)

Writes the internal itemArray to MM table:

Parameters:
stringMM table name
integerLocal UID
booleanIf set, then table names will always be written.
Returns:
void

Definition at line 344 of file class.t3lib_loaddbgroup.php.

References $additionalWhere, $GLOBALS, $res, $row, and $value.


Member Data Documentation

t3lib_loadDBGroup::$additionalWhere = array()

Definition at line 77 of file class.t3lib_loaddbgroup.php.

Referenced by readMM(), remapMM(), and writeMM().

t3lib_loadDBGroup::$checkIfDeleted = 1

Definition at line 78 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$currentTable

Definition at line 88 of file class.t3lib_loaddbgroup.php.

Referenced by start().

t3lib_loadDBGroup::$dbPaths = Array()

Definition at line 79 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$firstTable = ''

Definition at line 80 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$fromTC = 1

Reimplemented in FE_loadDBGroup.

Definition at line 70 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$itemArray = Array()

Definition at line 75 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_insert_fields = array()

Definition at line 93 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_is_foreign = 0

Definition at line 83 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_isMultiTableRelationship = 0

Definition at line 87 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_match_fields = array()

Definition at line 92 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_oppositeField = ''

Definition at line 84 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_oppositeFieldConf = ''

Definition at line 86 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_oppositeTable = ''

Definition at line 85 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$MM_table_where = ''

Definition at line 94 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$nonTableArray = array()

Definition at line 76 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$registerNonTableValues = 0

Definition at line 71 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$secondTable = ''

Definition at line 81 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$tableArray = Array()

Definition at line 74 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$undeleteRecord

Definition at line 89 of file class.t3lib_loaddbgroup.php.

t3lib_loadDBGroup::$updateReferenceIndex = TRUE [protected]

Definition at line 99 of file class.t3lib_loaddbgroup.php.

Referenced by setUpdateReferenceIndex().


The documentation for this class was generated from the following file: