Solutions Open Source

Référence de la classe t3lib_refindex

Liste de tous les membres

Fonctions membres publiques

 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)
 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)

Attributs publics

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


Documentation des fonctions membres

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.

Paramètres:
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.
Renvoie:
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::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!)

Paramètres:
string Table name from $TCA
integer Record UID
Renvoie:
array Index Rows

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.

Paramètres:
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.
Renvoie:
array Array record to insert into table.

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

Enter database references to ->relations array

Paramètres:
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)
Renvoie:
void

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

Enter file references to ->relations array

Paramètres:
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
Renvoie:
void

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

Enter softref references to ->relations array

Paramètres:
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
Renvoie:
void

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"

Paramètres:
string Table name
array Row from table
string Specific field to fetch for.
Renvoie:
array Array with information about relations
Voir également:
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!

Paramètres:
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
Renvoie:
void
Voir également:
t3lib_TCEmain::checkValue_flex_procInData_travDS()

t3lib_refindex::getRelations_procFiles ( value,
conf,
uid 
)

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

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

t3lib_refindex::getRelations_procDB ( value,
conf,
uid,
table = '' 
)

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

Paramètres:
string Field value
array Field configuration array of type "TCA/columns"
integer Field uid
string Table name
Renvoie:
array If field type is OK it will return an array with the database relations. Else false

t3lib_refindex::setReferenceValue ( hash,
newValue,
returnDataArray = 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

Paramètres:
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.
Renvoie:
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:

Paramètres:
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.
Renvoie:
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:

Paramètres:
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.
Renvoie:
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

Paramètres:
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.
Renvoie:
string Error message if any, otherwise false = OK

t3lib_refindex::wordIndexing ( table,
uid 
)

t3lib_refindex::updateWordIndex ( words,
table,
uid 
)

Update/Create word index for record

Paramètres:
array Word list array (words are values in array)
string Table
integer Rec uid
Renvoie:
void

t3lib_refindex::submitWords ( wl  ) 

Adds new words to db

Paramètres:
array Word List array (where each word has information about position etc).
Renvoie:
void

t3lib_refindex::isReferenceField ( conf  ) 

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

Paramètres:
array config array for TCA/columns field
Renvoie:
boolean True if DB reference field (group/db or select with foreign-table)

t3lib_refindex::destPathFromUploadFolder ( folder  ) 

Returns destination path to an upload folder given by $folder

Paramètres:
string Folder relative to PATH_site
Renvoie:
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

Paramètres:
string Error message
Renvoie:
void

t3lib_refindex::updateIndex ( testOnly,
cli_echo = FALSE 
)

Updating Index (External API)

Paramètres:
boolean If set, only a test
boolean If set, output CLI status
Renvoie:
array Header and body status content


Documentation des données membres

t3lib_refindex::$temp_flexRelations = array()

t3lib_refindex::$errorLog = array()

t3lib_refindex::$WSOL = FALSE

t3lib_refindex::$relations = array()

t3lib_refindex::$words_strings = array()

t3lib_refindex::$words = array()

t3lib_refindex::$hashVersion = 1


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:42:29 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3