"TYPO3 4.0.1: t3lib_refindex Class Reference", "datetime" => "Sat Dec 2 19:26:08 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>

t3lib_refindex Class Reference

List of all members.

Public Member Functions

 updateRefIndexTable ($table, $uid, $testOnly=FALSE)
 generateRefIndexData ($table, $uid)
 createEntryData ($table, $uid, $field, $flexpointer, $deleted, $ref_table, $ref_uid, $ref_string='', $sort=-1, $softref_key='', $softref_id='')
 createEntryData_dbRels ($table, $uid, $fieldname, $flexpointer, $deleted, $items)
 createEntryData_fileRels ($table, $uid, $fieldname, $flexpointer, $deleted, $items)
 createEntryData_softreferences ($table, $uid, $fieldname, $flexpointer, $deleted, $keys)
 getRelations ($table, $row)
 getRelations_flexFormCallBack ($dsArr, $dataValue, $PA, $structurePath, &$pObj)
 getRelations_procFiles ($value, $conf, $uid)
 getRelations_procDB ($value, $conf, $uid)
 isReferenceField ($conf)
 destPathFromUploadFolder ($folder)
 error ($msg)
 updateIndex ($testOnly, $cli_echo=FALSE)

Public Attributes

 $temp_flexRelations = array()
 $errorLog = array()
 $WSOL = FALSE
 $relations = array()
 $hashVersion = 1

Detailed Description

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


Member Function Documentation

t3lib_refindex::createEntryData table,
uid,
field,
flexpointer,
deleted,
ref_table,
ref_uid,
ref_string = '',
sort = -1,
softref_key = '',
softref_id = ''
 

Create array with field/value pairs ready to insert in database. The "hash" field is a fingerprint value across this table.

Parameters:
string Tablename of source record (where reference is located)
integer UID of source record (where reference is located)
string Fieldname of source record (where reference is located)
string Pointer to location inside flexform structure where reference is located in [field]
integer Whether record is deleted-flagged or not
string For database references; the tablename the reference points to. Special keyword "_FILE" indicates that "ref_string" is a file reference either absolute or relative to PATH_site. Special keyword "_STRING" indicates some special usage (typ. softreference) where "ref_string" is used for the value.
integer For database references; The UID of the record (zero "ref_table" is "_FILE" or "_STRING")
string For "_FILE" or "_STRING" references: The filepath (relative to PATH_site or absolute) or other string.
integer The sorting order of references if many (the "group" or "select" TCA types). -1 if no sorting order is specified.
string If the reference is a soft reference, this is the soft reference parser key. Otherwise empty.
string Soft reference ID for key. Might be useful for replace operations.
Returns:
array Array record to insert into table.

Definition at line 249 of file class.t3lib_refindex.php.

t3lib_refindex::createEntryData_dbRels table,
uid,
fieldname,
flexpointer,
deleted,
items
 

Enter database references to ->relations array

Parameters:
string [See createEntryData, arg 1]
integer [See createEntryData, arg 2]
string [See createEntryData, arg 3]
string [See createEntryData, arg 4]
string [See createEntryData, arg 5]
array Data array with databaes relations (table/id)
Returns:
void

Definition at line 276 of file class.t3lib_refindex.php.

t3lib_refindex::createEntryData_fileRels table,
uid,
fieldname,
flexpointer,
deleted,
items
 

Enter file references to ->relations array

Parameters:
string [See createEntryData, arg 1]
integer [See createEntryData, arg 2]
string [See createEntryData, arg 3]
string [See createEntryData, arg 4]
string [See createEntryData, arg 5]
array Data array with file relations
Returns:
void

Definition at line 293 of file class.t3lib_refindex.php.

References t3lib_div::isFirstPartOfStr().

t3lib_refindex::createEntryData_softreferences table,
uid,
fieldname,
flexpointer,
deleted,
keys
 

Enter softref references to ->relations array

Parameters:
string [See createEntryData, arg 1]
integer [See createEntryData, arg 2]
string [See createEntryData, arg 3]
string [See createEntryData, arg 4]
string [See createEntryData, arg 5]
array Data array with soft reference keys
Returns:
void

Definition at line 314 of file class.t3lib_refindex.php.

t3lib_refindex::destPathFromUploadFolder folder  ) 
 

Returns destination path to an upload folder given by $folder

Parameters:
string Folder relative to PATH_site
Returns:
string Input folder prefixed with PATH_site. No checking for existence is done. Output must be a folder without trailing slash.

Definition at line 613 of file class.t3lib_refindex.php.

t3lib_refindex::error msg  ) 
 

Sets error message in the internal error log

Parameters:
string Error message
Returns:
void

Definition at line 623 of file class.t3lib_refindex.php.

t3lib_refindex::generateRefIndexData table,
uid
 

Returns array of arrays with an index of all references found in record from table/uid If the result is used to update the sys_refindex table then ->WSOL must NOT be true (no workspace overlay anywhere!)

Parameters:
string Table name from $TCA
integer Record UID
Returns:
array Index Rows

Definition at line 172 of file class.t3lib_refindex.php.

Referenced by updateRefIndexTable().

t3lib_refindex::getRelations table,
row
 

Returns relation information for a $table/$row-array Traverses all fields in input row which are configured in TCA/columns It looks for hard relations to files and records in the TCA types "select" and "group"

Parameters:
string Table name
array Row from table
Returns:
array Array with information about relations
See also:
export_addRecord()

Definition at line 369 of file class.t3lib_refindex.php.

References t3lib_BEfunc::explodeSoftRefParserList(), t3lib_BEfunc::getFlexFormDS(), t3lib_div::loadTCA(), t3lib_div::makeInstance(), t3lib_BEfunc::softRefParserObj(), and t3lib_div::xml2array().

t3lib_refindex::getRelations_flexFormCallBack dsArr,
dataValue,
PA,
structurePath,
&$  pObj
 

Callback function for traversing the FlexForm structure in relation to finding file and DB references!

Parameters:
array Data structure for the current value
mixed Current value
array Additional configuration used in calling function
string Path of value in DS structure
object Object reference to caller
Returns:
void
See also:
t3lib_TCEmain::checkValue_flex_procInData_travDS()

Definition at line 466 of file class.t3lib_refindex.php.

References t3lib_BEfunc::explodeSoftRefParserList(), and t3lib_BEfunc::softRefParserObj().

t3lib_refindex::getRelations_procDB value,
conf,
uid
 

Check field configuration if it is a DB relation field and extract DB relations if any

Parameters:
string Field value
array Field configuration array of type "TCA/columns"
integer Field uid
Returns:
array If field type is OK it will return an array with the database relations. Else false

Definition at line 566 of file class.t3lib_refindex.php.

References t3lib_div::makeInstance().

t3lib_refindex::getRelations_procFiles value,
conf,
uid
 

Check field configuration if it is a file relation field and extract file relations if any

Parameters:
string Field value
array Field configuration array of type "TCA/columns"
integer Field uid
Returns:
array If field type is OK it will return an array with the files inside. Else false

Definition at line 516 of file class.t3lib_refindex.php.

References t3lib_div::makeInstance().

t3lib_refindex::isReferenceField conf  ) 
 

Returns true if the TCA/columns field type is a DB reference field

Parameters:
array config array for TCA/columns field
Returns:
boolean True if DB reference field (group/db or select with foreign-table)

Definition at line 603 of file class.t3lib_refindex.php.

t3lib_refindex::updateIndex testOnly,
cli_echo = FALSE
 

Updating Index (External API)

Parameters:
boolean If set, only a test
boolean If set, output CLI status
Returns:
array Header and body status content

Definition at line 634 of file class.t3lib_refindex.php.

References t3lib_div::makeInstance().

t3lib_refindex::updateRefIndexTable table,
uid,
testOnly = FALSE
 

Call this function to update the sys_refindex table for a record. NOTICE: Currently, references updated for a deleted-flagged record will not include those from within flexform fields in some cases where the data structure is defined by another record since the resolving process ignores deleted records! This will also result in bad cleaning up in tcemain I think... Anyway, thats the story of flexforms; as long as the DS can change, lots of references can get lost in no time.

Parameters:
string Table name
integer UID of record
boolean If set, nothing will be written to the index but the result value will still report statistics on what as added, deleted and kept. Can be used for mere analysis.
Returns:
array Array with statistics about how many index records were added, deleted and not altered plus the complete reference set for the record.

Definition at line 101 of file class.t3lib_refindex.php.

References $relations, generateRefIndexData(), and t3lib_BEfunc::getRecordRaw().


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