TYPO3 API  SVNRelease
Public Member Functions | Public Attributes
t3lib_flexformtools Class Reference

List of all members.

Public Member Functions

 traverseFlexFormXMLData ($table, $field, $row, $callBackObj, $callBackMethod_value)
 traverseFlexFormXMLData_recurse ($dataStruct, $editData, &$PA, $path= '')
 getAvailableLanguages ()
 cleanFlexFormXML ($table, $field, $row)
 cleanFlexFormXML_callBackFunction ($dsArr, $data, $PA, $path, $pObj)
getArrayValueByPath ($pathArray, &$array)
 setArrayValueByPath ($pathArray, &$array, $value)
 flexArray2Xml ($array, $addPrologue=FALSE)

Public Attributes

 $convertCharset = FALSE
 $reNumberIndexesOfSectionData = FALSE
 $traverseFlexFormXMLData_DS = array()
 $traverseFlexFormXMLData_Data = array()
 $flexArray2Xml_options
 $callBackObj = NULL
 $cleanFlexFormXML = array()

Detailed Description

Definition at line 66 of file class.t3lib_flexformtools.php.


Member Function Documentation

t3lib_flexformtools::cleanFlexFormXML ( table,
field,
row 
)

Cleaning up FlexForm XML to hold only the values it may according to its Data Structure. Also the order of tags will follow that of the data structure. BE CAREFUL: DO not clean records in workspaces unless IN the workspace! The Data Structure might resolve falsely on a workspace record when cleaned from Live workspace.

Parameters:
stringTable name
stringField name of the flex form field in which the XML is found that should be cleaned.
arrayThe record
Returns:
string Clean XML from FlexForm field

Definition at line 335 of file class.t3lib_flexformtools.php.

References $row, flexArray2Xml(), and t3lib_div\makeInstance().

Referenced by cleanFlexFormXML_callBackFunction().

t3lib_flexformtools::cleanFlexFormXML_callBackFunction ( dsArr,
data,
PA,
path,
pObj 
)

Call back function for t3lib_flexformtools class Basically just setting the value in a new array (thus cleaning because only values that are valid are visited!)

Parameters:
arrayData structure for the current value
mixedCurrent value
arrayAdditional configuration used in calling function
stringPath of value in DS structure
objectObject reference to caller
Returns:
void

Definition at line 359 of file class.t3lib_flexformtools.php.

References $GLOBALS, and cleanFlexFormXML().

t3lib_flexformtools::flexArray2Xml ( array,
addPrologue = FALSE 
)

Convert FlexForm data array to XML

Parameters:
arrayArray to output in <T3FlexForms> XML
booleanIf set, the XML prologue is returned as well.
Returns:
string XML content.

Definition at line 446 of file class.t3lib_flexformtools.php.

References $GLOBALS, and t3lib_div\array2xml().

Referenced by cleanFlexFormXML().

& t3lib_flexformtools::getArrayValueByPath ( pathArray,
&$  array 
)

Get a value from a multi-dimensional array by giving a path "../../.." pointing to the element

Parameters:
stringThe path pointing to the value field, eg. test/2/title to access $array['test'][2]['title']
arrayArray to get value from. Passed by reference so the value returned can be used to change the value in the array!
Returns:
mixed Value returned

Definition at line 387 of file class.t3lib_flexformtools.php.

t3lib_flexformtools::getAvailableLanguages ( )

Returns an array of available languages to use for FlexForm operations

Returns:
array

Definition at line 288 of file class.t3lib_flexformtools.php.

References $GLOBALS, $res, $row, t3lib_BEfunc\deleteClause(), t3lib_BEfunc\getRecord(), and t3lib_extMgm\isLoaded().

Referenced by traverseFlexFormXMLData().

t3lib_flexformtools::setArrayValueByPath ( pathArray,
&$  array,
value 
)

Set a value in a multi-dimensional array by giving a path "../../.." pointing to the element

Parameters:
stringThe path pointing to the value field, eg. test/2/title to access $array['test'][2]['title']
arrayArray to set value in. Passed by reference so the value returned can be used to change the value in the array!
mixedValue to set
Returns:
mixed Value returned

Definition at line 416 of file class.t3lib_flexformtools.php.

References $value.

t3lib_flexformtools::traverseFlexFormXMLData ( table,
field,
row,
callBackObj,
callBackMethod_value 
)

Handler for Flex Forms

Parameters:
stringThe table name of the record
stringThe field name of the flexform field to work on
arrayThe record data array
objectObject (passed by reference) in which the call back function is located
stringMethod name of call back function in object for values
Returns:
boolean If true, error happened (error string returned)

Definition at line 106 of file class.t3lib_flexformtools.php.

References $callBackObj, $GLOBALS, $row, getAvailableLanguages(), t3lib_BEfunc\getFlexFormDS(), t3lib_div\resolveSheetDefInDS(), traverseFlexFormXMLData_recurse(), t3lib_div\xml2array(), and t3lib_div\xmlGetHeaderAttribs().

t3lib_flexformtools::traverseFlexFormXMLData_recurse ( dataStruct,
editData,
&$  PA,
path = '' 
)

Recursively traversing flexform data according to data structure and element data

Parameters:
array(Part of) data structure array that applies to the sub section of the flexform data we are processing
array(Part of) edit data array, reflecting current part of data structure
arrayAdditional parameters passed.
stringTelling the "path" to the element in the flexform XML
Returns:
array

Definition at line 215 of file class.t3lib_flexformtools.php.

References $value.

Referenced by traverseFlexFormXMLData().


Member Data Documentation

t3lib_flexformtools::$callBackObj = NULL

Reference to object called

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

Referenced by traverseFlexFormXMLData().

t3lib_flexformtools::$cleanFlexFormXML = array()

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

t3lib_flexformtools::$convertCharset = FALSE

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

t3lib_flexformtools::$flexArray2Xml_options
Initial value:
 array(
        'parentTagMap' => array(
            'data' => 'sheet',
            'sheet' => 'language',
            'language' => 'field',
            'el' => 'field',
            'field' => 'value',
            'field:el' => 'el',
            'el:_IS_NUM' => 'section',
            'section' => 'itemType'
        ),
        'disableTypeAttrib' => 2
    )

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

t3lib_flexformtools::$reNumberIndexesOfSectionData = FALSE

Definition at line 69 of file class.t3lib_flexformtools.php.

t3lib_flexformtools::$traverseFlexFormXMLData_Data = array()

Definition at line 72 of file class.t3lib_flexformtools.php.

t3lib_flexformtools::$traverseFlexFormXMLData_DS = array()

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


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