[ Index ] |
|
Code source de Typo3 4.1.3 |
[Code source] [Imprimer] [Statistiques]
Contains class for loading database groups $Id: class.t3lib_loaddbgroup.php 1929 2007-01-23 20:11:23Z ingmars $ Revised for TYPO3 3.6 September/2003 by Kasper Skaarhoj
Author: | Kasper Skaarhoj <kasperYYYY@typo3.com> |
Poids: | 745 lignes (30 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
t3lib_loadDBGroup:: (14 méthodes):
start()
readList()
sortList()
readMM()
writeMM()
readForeignField()
writeForeignField()
getValueArray()
convertPosNeg()
getFromDB()
readyForInterface()
countItems()
updateRefIndex()
isOnSymmetricSide()
Classe: t3lib_loadDBGroup - X-Ref
Load database groups (relations)start($itemlist, $tablelist, $MMtable='', $MMuid=0, $currentTable='', $conf=array() X-Ref |
Initialization of the class. param: string List of group/select items param: string Comma list of tables, first table takes priority if no table is set for an entry in the list. param: string Name of a MM table. param: integer Local UID for MM lookup param: string current table name param: integer TCA configuration for current field return: void |
readList($itemlist) X-Ref |
Explodes the item list and stores the parts in the internal arrays itemArray and tableArray from MM records. param: string Item list return: void |
sortList($sortby) X-Ref |
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! param: string $sortby: The default_sortby field/command (e.g. 'price DESC') return: void |
readMM($tableName,$uid) X-Ref |
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() param: string MM Tablename param: integer Local UID return: void |
writeMM($tableName,$uid,$prependTableName=0) X-Ref |
Writes the internal itemArray to MM table: param: string MM table name param: integer Local UID param: boolean If set, then table names will always be written. return: void |
readForeignField($uid, $conf) X-Ref |
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. param: integer $uid: The uid of the parent record (this value is also on the foreign_table in the foreign_field) param: array $conf: TCA configuration for current field return: void |
writeForeignField($conf, $parentUid, $updateToUid=0, $skipSorting=false) X-Ref |
Write the sorting values to a foreign_table, that has a foreign_field (uid of the parent record) param: array $conf: TCA configuration for current field param: integer $parentUid: The uid of the parent record param: boolean $updateForeignField: Whether to update the foreign field with the $parentUid (on Copy) param: boolean $skipSorting: Do not update the sorting columns, this could happen for imported values return: void |
getValueArray($prependTableName='') X-Ref |
After initialization you can extract an array of the elements from the object. Use this function for that. param: boolean If set, then table names will ALWAYS be prepended (unless its a _NO_TABLE value) return: array A numeric array. |
convertPosNeg($valueArray,$fTable,$nfTable) X-Ref |
Converts id numbers from negative to positive. param: array Array of [table]_[id] pairs. param: string Foreign table (the one used for positive numbers) param: string NEGative foreign table return: 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. |
getFromDB() X-Ref |
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. return: void |
readyForInterface() X-Ref |
Prepare items from itemArray to be transferred to the TCEforms interface (as a comma list) return: string |
countItems($returnAsArray = true) X-Ref |
Counts the items in $this->itemArray and puts this value in an array by default. param: boolean Whether to put the count value in an array return: mixed The plain count as integer or the same inside an array |
updateRefIndex($table,$id) X-Ref |
Update Reference Index (sys_refindex) for a record Should be called any almost any update to a record which could affect references inside the record. (copied from TCEmain) param: string Table name param: integer Record UID return: void |
isOnSymmetricSide($parentUid, $parentConf, $childRec) X-Ref |
Checks, if we're looking from the "other" side, the symmetric side, to a symmetric relation. param: string $parentUid: The uid of the parent record param: array $parentConf: The TCA configuration of the parent field embedding the child records param: array $childRec: The record row of the child record return: boolean Returns true if looking from the symmetric ("other") side to the relation. |
Généré le : Sun Nov 25 17:13:16 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |