t3lib_refindex Klassenreferenz

Aufstellung aller Elemente

Öffentliche Methoden

 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, $onlyField='')
 getRelations_flexFormCallBack ($dsArr, $dataValue, $PA, $structurePath, &$pObj)
 getRelations_procFiles ($value, $conf, $uid)
 getRelations_procDB ($value, $conf, $uid, $table= '')
 setReferenceValue ($hash, $newValue, $returnDataArray=FALSE, $bypassWorkspaceAdminCheck=FALSE)
 setReferenceValue_dbRels ($refRec, $itemArray, $newValue, &$dataArray, $flexpointer='')
 setReferenceValue_fileRels ($refRec, $itemArray, $newValue, &$dataArray, $flexpointer='')
 setReferenceValue_softreferences ($refRec, $softref, $newValue, &$dataArray, $flexpointer='')
 wordIndexing ($table, $uid)
 updateWordIndex ($words, $table, $uid)
 submitWords ($wl)
 isReferenceField ($conf)
 destPathFromUploadFolder ($folder)
 error ($msg)
 updateIndex ($testOnly, $cli_echo=FALSE)

Öffentliche Attribute

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

Dokumentation der Elementfunktionen

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.

Parameter:
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.
Rückgabe:
array Array record to insert into table.
t3lib_refindex::createEntryData_dbRels ( table,
uid,
fieldname,
flexpointer,
deleted,
items 
)

Enter database references to ->relations array

Parameter:
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)
Rückgabe:
void
t3lib_refindex::createEntryData_fileRels ( table,
uid,
fieldname,
flexpointer,
deleted,
items 
)

Enter file references to ->relations array

Parameter:
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
Rückgabe:
void
t3lib_refindex::createEntryData_softreferences ( table,
uid,
fieldname,
flexpointer,
deleted,
keys 
)

Enter softref references to ->relations array

Parameter:
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
Rückgabe:
void
t3lib_refindex::destPathFromUploadFolder ( folder  ) 

Returns destination path to an upload folder given by $folder

Parameter:
string Folder relative to PATH_site
Rückgabe:
string Input folder prefixed with PATH_site. No checking for existence is done. Output must be a folder without trailing slash.
t3lib_refindex::error ( msg  ) 

Sets error message in the internal error log

Parameter:
string Error message
Rückgabe:
void
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!)

Parameter:
string Table name from $TCA
integer Record UID
Rückgabe:
array Index Rows
t3lib_refindex::getRelations ( table,
row,
onlyField = '' 
)

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"

Parameter:
string Table name
array Row from table
string Specific field to fetch for.
Rückgabe:
array Array with information about relations
Siehe auch:
export_addRecord()
t3lib_refindex::getRelations_flexFormCallBack ( dsArr,
dataValue,
PA,
structurePath,
&$  pObj 
)

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

Parameter:
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
Rückgabe:
void
Siehe auch:
t3lib_TCEmain::checkValue_flex_procInData_travDS()
t3lib_refindex::getRelations_procDB ( value,
conf,
uid,
table = '' 
)

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

Parameter:
string Field value
array Field configuration array of type "TCA/columns"
integer Field uid
string Table name
Rückgabe:
array If field type is OK it will return an array with the database relations. Else false
t3lib_refindex::getRelations_procFiles ( value,
conf,
uid 
)

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

Parameter:
string Field value
array Field configuration array of type "TCA/columns"
integer Field uid
Rückgabe:
array If field type is OK it will return an array with the files inside. Else false
t3lib_refindex::isReferenceField ( conf  ) 

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

Parameter:
array config array for TCA/columns field
Rückgabe:
boolean True if DB reference field (group/db or select with foreign-table)
t3lib_refindex::setReferenceValue ( hash,
newValue,
returnDataArray = FALSE,
bypassWorkspaceAdminCheck = FALSE 
)

Setting the value of a reference or removing it completely. Usage: For lowlevel clean up operations! WARNING: With this you can set values that are not allowed in the database since it will bypass all checks for validity! Hence it is targetted at clean-up operations. Please use TCEmain in the usual ways if you wish to manipulate references. Since this interface allows updates to soft reference values (which TCEmain does not directly) you may like to use it for that as an exception to the warning above. Notice; If you want to remove multiple references from the same field, you MUST start with the one having the highest sorting number. If you don't the removal of a reference with a lower number will recreate an index in which the remaining references in that field has new hash-keys due to new sorting numbers - and you will get errors for the remaining operations which cannot find the hash you feed it! To ensure proper working only admin-BE_USERS in live workspace should use this function

Parameter:
string 32-byte hash string identifying the record from sys_refindex which you wish to change the value for
mixed Value you wish to set for reference. If NULL, the reference is removed (unless a soft-reference in which case it can only be set to a blank string). If you wish to set a database reference, use the format "[table]:[uid]". Any other case, the input value is set as-is
boolean Return $dataArray only, do not submit it to database.
boolean If set, it will bypass check for workspace-zero and admin user
Rückgabe:
string If a return string, that carries an error message, otherwise false (=OK) (except if $returnDataArray is set!)
t3lib_refindex::setReferenceValue_dbRels ( refRec,
itemArray,
newValue,
&$  dataArray,
flexpointer = '' 
)

Setting a value for a reference for a DB field:

Parameter:
array sys_refindex record
array Array of references from that field
string Value to substitute current value with (or NULL to unset it)
array data array in which the new value is set (passed by reference)
string Flexform pointer, if in a flex form field.
Rückgabe:
string Error message if any, otherwise false = OK
t3lib_refindex::setReferenceValue_fileRels ( refRec,
itemArray,
newValue,
&$  dataArray,
flexpointer = '' 
)

Setting a value for a reference for a FILE field:

Parameter:
array sys_refindex record
array Array of references from that field
string Value to substitute current value with (or NULL to unset it)
array data array in which the new value is set (passed by reference)
string Flexform pointer, if in a flex form field.
Rückgabe:
string Error message if any, otherwise false = OK
t3lib_refindex::setReferenceValue_softreferences ( refRec,
softref,
newValue,
&$  dataArray,
flexpointer = '' 
)

Setting a value for a soft reference token

Parameter:
array sys_refindex record
array Array of soft reference occurencies
string Value to substitute current value with
array data array in which the new value is set (passed by reference)
string Flexform pointer, if in a flex form field.
Rückgabe:
string Error message if any, otherwise false = OK
t3lib_refindex::submitWords ( wl  ) 

Adds new words to db

Parameter:
array Word List array (where each word has information about position etc).
Rückgabe:
void
t3lib_refindex::updateIndex ( testOnly,
cli_echo = FALSE 
)

Updating Index (External API)

Parameter:
boolean If set, only a test
boolean If set, output CLI status
Rückgabe:
array Header and body status content
t3lib_refindex::updateRefIndexTable ( table,
uid,
testOnly = FALSE 
)

Call this function to update the sys_refindex table for a record (even one just deleted) 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.

Parameter:
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 is added, deleted and kept. Can be used for mere analysis.
Rückgabe:
array Array with statistics about how many index records were added, deleted and not altered plus the complete reference set for the record.
t3lib_refindex::updateWordIndex ( words,
table,
uid 
)

Update/Create word index for record

Parameter:
array Word list array (words are values in array)
string Table
integer Rec uid
Rückgabe:
void
t3lib_refindex::wordIndexing ( table,
uid 
)

Indexing words from table records. Can be useful for quick backend look ups in records across the system.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
 Alle Klassen Namensbereiche Funktionen Variablen

Erzeugt am Wed Oct 28 16:40:23 2009 für Typo3 von  doxygen 1.6.1