TYPO3 API  SVNRelease
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
t3lib_TCEforms_inline Class Reference

List of all members.

Public Member Functions

 init (&$tceForms)
 getSingleField_typeInline ($table, $field, $row, &$PA)
 renderForeignRecord ($parentUid, $rec, $config=array())
 renderForeignRecordHeader ($parentUid, $foreign_table, $rec, $config, $isVirtualRecord=FALSE)
 renderForeignRecordHeaderControl ($parentUid, $foreign_table, $rec, $config=array(), $isVirtualRecord=FALSE)
 renderCombinationTable (&$rec, $appendFormFieldNames, $config=array())
 renderPossibleRecordsSelector ($selItems, $conf, $uniqueIds=array())
 renderPossibleRecordsSelectorTypeSelect ($selItems, $conf, &$PA, $uniqueIds=array())
 renderPossibleRecordsSelectorTypeGroupDB ($conf, &$PA)
 addJavaScriptSortable ($objectId)
 processAjaxRequest ($params, $ajaxObj)
 createNewRecord ($domObjectId, $foreignUid=0)
 getRecordDetails ($domObjectId)
 setExpandedCollapsedState ($domObjectId, $expand, $collapse)
 getRelatedRecords ($table, $field, $row, &$PA, $config)
 getPossibleRecords ($table, $field, $row, $conf, $checkForConfField= 'foreign_selector')
 getUniqueIds ($records, $conf=array(), $splitValue=FALSE)
 getRecord ($pid, $table, $uid, $cmd= '')
 getNewRecord ($pid, $table)
 pushStructure ($table, $uid, $field= '', $config=array())
 popStructure ()
 updateStructureNames ()
 getStructureItemName ($levelData, $disposal=self::Disposal_AttributeId)
 getStructureLevel ($level)
 getStructurePath ($structureDepth=-1)
 parseStructureString ($string, $loadConfig=TRUE)
 checkConfiguration (&$config)
 checkAccess ($cmd, $table, $theUid)
 compareStructureConfiguration ($compare)
 normalizeUid ($string)
 wrapFormsSection ($section, $styleAttrs=array(), $tableAttrs=array())
 isInlineChildAndLabelField ($table, $field)
 getStructureDepth ()
 arrayCompareComplex ($subjectArray, $searchArray, $type= '')
 isAssociativeArray ($object)
 removeFromArray ($needle, $haystack, $strict=NULL)
 getPossibleRecordsFlat ($possibleRecords)
 getPossibleRecordsSelectorConfig ($conf, $field= '')
 getPossibleRecordsSelectorType ($config)
 skipField ($table, $field, $row, $config)
 getExpandedCollapsedState ($table, $uid)
 updateInlineView (&$uc, $tce)
 getLevelMargin ()

Public Attributes

const Structure_Separator = '-'
const Disposal_AttributeName = 'Disposal_AttributeName'
const Disposal_AttributeId = 'Disposal_AttributeId'
 $fObj
 $backPath
 $isAjaxCall = FALSE
 $inlineStructure = array()
 $inlineFirstPid
 $inlineNames = array()
 $inlineData = array()
 $inlineView = array()
 $inlineCount = 0
 $inlineStyles = array()
 $prependNaming = 'data'
 $prependFormFieldNames
 $prependCmdFieldNames

Protected Member Functions

 initHookObjects ()
 renderMainFields ($table, $row)
 getLevelInteractionLink ($type, $objectPrefix, $conf=array())
 processAjaxRequestConstruct (&$ajaxArguments)
 getCommonScriptCalls (&$jsonArray, $config)
 getErrorMessageForAJAX ($message)
 synchronizeLocalizeRecords ($domObjectId, $type)
 getExecuteChangesJsonArray ($oldItemList, $newItemList)
 getRelatedRecordsArray ($pid, $table, $itemList)
 getRelatedRecordsUidArray ($itemList)
 getLocalizationDifferences ($table, array $options, array $recordsOriginal, array $recordsLocalization)
 getNewRecordPid ($table, $parentPid=NULL)
 getHeadTags ()
 wrapWithAnchor ($text, $link, $attributes=array())

Protected Attributes

 $hookObjects = array()

Detailed Description

The Inline-Relational-Record-Editing (IRRE) functions as part of the TCEforms.

Id:
class.t3lib_tceforms_inline.php 10547 2011-02-22 20:03:57Z lolli
Author:
Oliver Hader <oliver@typo3.org> [CLASS/FUNCTION INDEX of SCRIPT]

88: class t3lib_TCEforms_inline 109: function init(&$tceForms) 127: function getSingleField_typeInline($table,$field,$row,&$PA)

SECTION: Regular rendering of forms, fields, etc. 263: function renderForeignRecord($parentUid, $rec, $config = array()) 319: function renderForeignRecordHeader($parentUid, $foreign_table,$rec,$config = array()) 375: function renderForeignRecordHeaderControl($table,$row,$config = array()) 506: function renderCombinationTable(&$rec, $appendFormFieldNames, $config = array()) 560: function renderPossibleRecordsSelector($selItems, $conf, $uniqueIds=array()) 627: function addJavaScript() 643: function addJavaScriptSortable($objectId)

SECTION: Handling of AJAX calls 665: function createNewRecord($domObjectId, $foreignUid = 0) 755: function getJSON($jsonArray) 770: function getNewRecordLink($objectPrefix, $conf = array())

SECTION: Get data from database and handle relations 807: function getRelatedRecords($table,$field,$row,&$PA,$config) 839: function getPossibleRecords($table,$field,$row,$conf,$checkForConfField='foreign_selector') 885: function getUniqueIds($records, $conf=array()) 905: function getRecord($pid, $table, $uid, $cmd='') 929: function getNewRecord($pid, $table)

SECTION: Structure stack for handling inline objects/levels 951: function pushStructure($table, $uid, $field = '', $config = array()) 967: function popStructure() 984: function updateStructureNames() 1000: function getStructureItemName($levelData) 1015: function getStructureLevel($level) 1032: function getStructurePath($structureDepth = -1) 1057: function parseStructureString($string, $loadConfig = false)

SECTION: Helper functions 1098: function checkConfiguration(&$config) 1123: function checkAccess($cmd, $table, $theUid) 1185: function compareStructureConfiguration($compare) 1199: function normalizeUid($string) 1213: function wrapFormsSection($section, $styleAttrs = array(), $tableAttrs = array()) 1242: function isInlineChildAndLabelField($table, $field) 1258: function getStructureDepth() 1295: function arrayCompareComplex($subjectArray, $searchArray, $type = '') 1349: function isAssociativeArray($object) 1364: function getPossibleRecordsFlat($possibleRecords) 1383: function skipField($table, $field, $row, $config)

TOTAL FUNCTIONS: 35 (This index is automatically created/updated by the extension "extdeveval")

Definition at line 92 of file class.t3lib_tceforms_inline.php.


Member Function Documentation

t3lib_TCEforms_inline::addJavaScriptSortable ( objectId)

Add Sortable functionality using script.acolo.us "Sortable".

Parameters:
string$objectId,:The container id of the object - elements inside will be sortable
Returns:
void

Definition at line 966 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::arrayCompareComplex ( subjectArray,
searchArray,
type = '' 
)

Handles complex comparison requests on an array. A request could look like the following:

$searchArray = array( 'AND' => array( 'key1' => 'value1', 'key2' => 'value2', 'OR' => array( 'subarray' => array( 'subkey' => 'subvalue' ), 'key3' => 'value3', 'key4' => 'value4' ) ) );

It is possible to use the array keys 'AND.1', 'AND.2', etc. to prevent overwriting the sub-array. It could be neccessary, if you use complex comparisons.

The example above means, key1 *AND* key2 (and their values) have to match with the $subjectArray and additional one *OR* key3 or key4 have to meet the same condition. It is also possible to compare parts of a sub-array (e.g. "subarray"), so this function recurses down one level in that sub-array.

Parameters:
array$subjectArray,:The array to search in
array$searchArray,:The array with keys and values to search for
string$type,:Use 'AND' or 'OR' for comparision
Returns:
boolean The result of the comparison

Definition at line 2175 of file class.t3lib_tceforms_inline.php.

References $value, and isAssociativeArray().

Referenced by compareStructureConfiguration().

t3lib_TCEforms_inline::checkAccess ( cmd,
table,
theUid 
)

Checks the page access rights (Code for access check mostly taken from alt_doc.php) as well as the table access rights of the user.

Parameters:
string$cmd,:The command that sould be performed ('new' or 'edit')
string$table,:The table to check access for
string$theUid,:The record uid of the table
Returns:
boolean Returns true is the user has access, or false if not

Definition at line 1975 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, debug(), t3lib_BEfunc\fixVersioningPid(), t3lib_BEfunc\getRecord(), getRecord(), and t3lib_div\testInt().

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::checkConfiguration ( &$  config)

Does some checks on the TCA configuration of the inline field to render.

Parameters:
array$config,:Reference to the TCA field configuration
string$table,:The table name of the record
string$field,:The field name which this element is supposed to edit
array$row,:The record data array of the parent
Returns:
boolean If critical configuration errors were found, false is returned

Definition at line 1924 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, and t3lib_div\deprecationLog().

Referenced by getRecordDetails(), and getSingleField_typeInline().

t3lib_TCEforms_inline::compareStructureConfiguration ( compare)

Check the keys and values in the $compare array against the ['config'] part of the top level of the stack. A boolean value is return depending on how the comparison was successful.

Parameters:
array$compare,:keys and values to compare to the ['config'] part of the top level of the stack
Returns:
boolean Whether the comparison was successful
See also:
arrayCompareComplex

Definition at line 2046 of file class.t3lib_tceforms_inline.php.

References arrayCompareComplex(), and getStructureLevel().

Referenced by skipField().

t3lib_TCEforms_inline::createNewRecord ( domObjectId,
foreignUid = 0 
)

Handle AJAX calls to show a new inline-record of the given table. Normally this method is never called from inside TYPO3. Always from outside by AJAX.

Parameters:
string$domObjectId,:The calling object in hierarchy, that requested a new record.
string$foreignUid,:If set, the new record should be inserted after that one.
Returns:
array An array to be used for JSON

Definition at line 1123 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::getCommonScriptCalls ( &$  jsonArray,
config 
) [protected]

Determines and sets several script calls to a JSON array, that would have been executed if processed in non-AJAX mode.

Parameters:
array&$jsonArray,:Reference of the array to be used for JSON
array$config,:The configuration of the IRRE field of the parent record
Returns:
void

Definition at line 1080 of file class.t3lib_tceforms_inline.php.

Referenced by synchronizeLocalizeRecords().

t3lib_TCEforms_inline::getErrorMessageForAJAX ( message) [protected]

Generates an error message that transferred as JSON for AJAX calls

Parameters:
string$message,:The error message to be shown
Returns:
array The error message in a JSON array

Definition at line 1104 of file class.t3lib_tceforms_inline.php.

Referenced by getRecordDetails().

t3lib_TCEforms_inline::getExecuteChangesJsonArray ( oldItemList,
newItemList 
) [protected]

Generates a JSON array which executes the changes and thus updates the forms view.

Parameters:
string$oldItemList,:List of related child reocrds before changes were made (old)
string$newItemList,:List of related child records after changes where made (new)
Returns:
array An array to be used for JSON

Definition at line 1314 of file class.t3lib_tceforms_inline.php.

Referenced by synchronizeLocalizeRecords().

t3lib_TCEforms_inline::getExpandedCollapsedState ( table,
uid 
)

Checks if a uid of a child table is in the inline view settings.

Parameters:
string$table,:Name of the child table
integer$uid,:uid of the the child record
Returns:
boolean true=expand, false=collapse

Definition at line 2409 of file class.t3lib_tceforms_inline.php.

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::getHeadTags ( ) [protected]

Parses the HTML tags that would have been inserted to the <head> of a HTML document and returns the found tags as multidimensional array.

Returns:
array The parsed tags with their attributes and innerHTML parts

Definition at line 2477 of file class.t3lib_tceforms_inline.php.

References t3lib_div\makeInstance().

t3lib_TCEforms_inline::getLevelInteractionLink ( type,
objectPrefix,
conf = array() 
) [protected]

Creates the HTML code of a general link to be used on a level of inline children. The possible keys for the parameter $type are 'newRecord', 'localize' and 'synchronize'.

Parameters:
string$type,:The link type, values are 'newRecord', 'localize' and 'synchronize'.
string$objectPrefix,:The "path" to the child record to create (e.g. 'data-parentPageId-partenTable-parentUid-parentField-childTable]')
array$conf,:TCA configuration of the parent(!) field
Returns:
string The HTML code of the new link, wrapped in a div

Definition at line 922 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::getLevelMargin ( )

Returns the the margin in pixels, that is used for each new inline level.

Returns:
integer A pixel value for the margin of each new inline level.

Definition at line 2467 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::getLocalizationDifferences ( table,
array $  options,
array $  recordsOriginal,
array $  recordsLocalization 
) [protected]

Gets the difference between current localized structure and the original language structure. If there are records which once were localized but don't exist in the original version anymore, the record row is marked with '__remove'. If there are records which can be localized and exist only in the original version, the record row is marked with '__create' and '__virtual'.

Parameters:
string$table,:The table name of the parent records
array$options,:Options defining what kind of records to display
array$recordsOriginal,:The uids of the child records of the original language
array$recordsLocalization,:The uids of the child records of the current localization
Returns:
array Merged array of uids of the child records of both versions

Definition at line 1518 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, and $row.

Referenced by getRelatedRecords().

t3lib_TCEforms_inline::getNewRecord ( pid,
table 
)

Wrapper. Calls getRecord in case of a new record should be created.

Parameters:
integer$pid,:The pid of the page the record should be stored (only relevant for NEW records)
string$table,:The table to fetch data from (= foreign_table)
Returns:
array A record row from the database post-processed by t3lib_transferData

Definition at line 1705 of file class.t3lib_tceforms_inline.php.

References $pid, getNewRecordPid(), and getRecord().

t3lib_TCEforms_inline::getNewRecordPid ( table,
parentPid = NULL 
) [protected]

Determines the corrected pid to be used for a new record. The pid to be used can be defined by a Page TSconfig.

Parameters:
string$table,:The table name
integer$parentPid,:The pid of the parent record
Returns:
integer The corrected pid to be used for a new record

Definition at line 1654 of file class.t3lib_tceforms_inline.php.

References t3lib_div\testInt().

Referenced by getNewRecord().

t3lib_TCEforms_inline::getPossibleRecords ( table,
field,
row,
conf,
checkForConfField = 'foreign_selector' 
)

Get possible records. Copied from TCEform and modified.

Parameters:
stringThe table name of the record
stringThe field name which this element is supposed to edit
arrayThe record data array where the value(s) for the field can be found
arrayAn array with additional configuration options.
string$checkForConfField,:For which field in the foreign_table the possible records should be fetched
Returns:
mixed Array of possible record items; false if type is "group/db", then everything could be "possible"

Definition at line 1557 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, $row, getPossibleRecordsSelectorConfig(), t3lib_div\inList(), t3lib_div\keepItemsInArray(), and t3lib_div\trimExplode().

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::getPossibleRecordsFlat ( possibleRecords)

Makes a flat array from the $possibleRecords array. The key of the flat array is the value of the record, the value of the flat array is the label of the record.

Parameters:
array$possibleRecords,:The possibleRecords array (for select fields)
Returns:
mixed A flat array with key=uid, value=label; if $possibleRecords isn't an array, false is returned.

Definition at line 2276 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::getPossibleRecordsSelectorConfig ( conf,
field = '' 
)

Determine the configuration and the type of a record selector.

Parameters:
array$conf,:TCA configuration of the parent(!) field
Returns:
array Associative array with the keys 'PA' and 'type', both are false if the selector was not valid.

Definition at line 2292 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, and getPossibleRecordsSelectorType().

Referenced by getPossibleRecords(), getSingleField_typeInline(), and renderForeignRecordHeader().

t3lib_TCEforms_inline::getPossibleRecordsSelectorType ( config)

Determine the type of a record selector, e.g. select or group/db.

Parameters:
array$config,:TCE configuration of the selector
Returns:
mixed The type of the selector, 'select' or 'groupdb' - false not valid

Definition at line 2332 of file class.t3lib_tceforms_inline.php.

Referenced by getPossibleRecordsSelectorConfig().

t3lib_TCEforms_inline::getRecord ( pid,
table,
uid,
cmd = '' 
)

Get a single record row for a TCA table from the database. t3lib_transferData is used for "upgrading" the values, especially the relations.

Parameters:
integer$pid,:The pid of the page the record should be stored (only relevant for NEW records)
string$table,:The table to fetch data from (= foreign_table)
string$uid,:The uid of the record to fetch, or the pid if a new record should be created
string$cmd,:The command to perform, empty or 'new'
Returns:
array A record row from the database post-processed by t3lib_transferData

Definition at line 1676 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, t3lib_BEfunc\getWorkspaceVersionOfRecord(), and t3lib_div\makeInstance().

Referenced by checkAccess(), getNewRecord(), getRecordDetails(), getRelatedRecords(), getRelatedRecordsArray(), getSingleField_typeInline(), and synchronizeLocalizeRecords().

t3lib_TCEforms_inline::getRecordDetails ( domObjectId)

Handle AJAX calls to dynamically load the form fields of a given record. (basically a copy of "createNewRecord") Normally this method is never called from inside TYPO3. Always from outside by AJAX.

Parameters:
string$domObjectId,:The calling object in hierarchy, that requested a new record.
Returns:
array An array to be used for JSON

Definition at line 1256 of file class.t3lib_tceforms_inline.php.

References checkConfiguration(), getErrorMessageForAJAX(), getRecord(), getStructureLevel(), and renderForeignRecord().

t3lib_TCEforms_inline::getRelatedRecords ( table,
field,
row,
&$  PA,
config 
)

Get the related records of the embedding item, this could be 1:n, m:n. Returns an associative array with the keys records and count. 'count' contains only real existing records on the current parent record.

Parameters:
string$table,:The table name of the record
string$field,:The field name which this element is supposed to edit
array$row,:The record data array where the value(s) for the field can be found
array$PA,:An array with additional configuration options.
array$config,:(Redundant) content of $PA['fieldConf']['config'] (for convenience)
Returns:
array The records related to the parent item as associative array.

Definition at line 1422 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, $pid, $row, t3lib_BEfunc\getInlineLocalizationMode(), getLocalizationDifferences(), getRecord(), and getRelatedRecordsArray().

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::getRelatedRecordsArray ( pid,
table,
itemList 
) [protected]

Gets the related records of the embedding item, this could be 1:n, m:n.

Parameters:
integer$pid,:The pid of the parent record
string$table,:The table name of the record
string$itemList,:The list of related child records
Returns:
array The records related to the parent item

Definition at line 1474 of file class.t3lib_tceforms_inline.php.

References $pid, getRecord(), and getRelatedRecordsUidArray().

Referenced by getRelatedRecords().

t3lib_TCEforms_inline::getRelatedRecordsUidArray ( itemList) [protected]

Gets an array with the uids of related records out of a list of items. This list could contain more information than required. This methods just extracts the uids.

Parameters:
string$itemList,:The list of related child records
Returns:
array An array with uids

Definition at line 1496 of file class.t3lib_tceforms_inline.php.

References $value, and t3lib_div\trimExplode().

Referenced by getRelatedRecordsArray().

t3lib_TCEforms_inline::getSingleField_typeInline ( table,
field,
row,
&$  PA 
)

Generation of TCEform elements of the type "inline" This will render inline-relational-record sets. Relations.

Parameters:
string$table,:The table name of the record
string$field,:The field name which this element is supposed to edit
array$row,:The record data array where the value(s) for the field can be found
array$PA,:An array with additional configuration options.
Returns:
string The HTML code for the TCEform field

Definition at line 173 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, $inlineView, $row, addJavaScriptSortable(), checkConfiguration(), getLevelInteractionLink(), t3lib_BEfunc\getLiveVersionIdOfRecord(), getPossibleRecords(), getPossibleRecordsFlat(), getPossibleRecordsSelectorConfig(), getRecord(), getRelatedRecords(), getStructureDepth(), getStructureLevel(), getUniqueIds(), t3lib_div\intInRange(), t3lib_BEfunc\isTableLocalizable(), t3lib_div\loadTCA(), popStructure(), pushStructure(), renderForeignRecord(), renderPossibleRecordsSelector(), and t3lib_div\testInt().

t3lib_TCEforms_inline::getStructureDepth ( )

Get the depth of the stable structure stack. (count($this->inlineStructure['stable'])

Returns:
integer The depth of the structure stack

Definition at line 2138 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline(), and skipField().

t3lib_TCEforms_inline::getStructureItemName ( levelData,
disposal = self::Disposal_AttributeId 
)

Create a name/id for usage in HTML output of a level of the structure stack to be used in form names.

Parameters:
array$levelData,:Array of a level of the structure stack (containing the keys table, uid and field)
string$disposal,:How the structure name is used (e.g. as
or <input name="...">)
Returns:
string The name/id of that level, to be used for HTML output

Definition at line 1786 of file class.t3lib_tceforms_inline.php.

Referenced by getStructurePath(), and updateStructureNames().

t3lib_TCEforms_inline::getStructureLevel ( level)

Get a level from the stack and return the data. If the $level value is negative, this function works top-down, if the $level value is positive, this function works bottom-up.

Parameters:
integer$level,:Which level to return
Returns:
array The item of the stack at the requested level

Definition at line 1813 of file class.t3lib_tceforms_inline.php.

Referenced by compareStructureConfiguration(), getRecordDetails(), getSingleField_typeInline(), getStructurePath(), isInlineChildAndLabelField(), renderForeignRecord(), skipField(), synchronizeLocalizeRecords(), and updateStructureNames().

t3lib_TCEforms_inline::getStructurePath ( structureDepth = -1)

Get the identifiers of a given depth of level, from the top of the stack to the bottom. An identifier looks like "<table>-<uid>-<field>".

Parameters:
integer$structureDepth,:How much levels to output, beginning from the top of the stack
Returns:
string The path of identifiers

Definition at line 1835 of file class.t3lib_tceforms_inline.php.

References getStructureItemName(), and getStructureLevel().

Referenced by updateStructureNames().

t3lib_TCEforms_inline::getUniqueIds ( records,
conf = array(),
splitValue = FALSE 
)

Gets the uids of a select/selector that should be unique an have already been used.

Parameters:
array$records,:All inline records on this level
array$conf,:The TCA field configuration of the inline field to be rendered
boolean$splitValue,:for usage with group/db, values come like "tx_table_123|Title%20abc", but we need "tx_table" and "123"
Returns:
array The uids, that have been used already and should be used unique

Definition at line 1620 of file class.t3lib_tceforms_inline.php.

References $value, and t3lib_div\trimExplode().

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::init ( &$  tceForms)

Intialize an instance of t3lib_TCEforms_inline

Parameters:
t3lib_TCEforms$tceForms,:Reference to an TCEforms instance
Returns:
void

Definition at line 127 of file class.t3lib_tceforms_inline.php.

References initHookObjects().

t3lib_TCEforms_inline::initHookObjects ( ) [protected]

Initialized the hook objects for this class. Each hook object has to implement the interface t3lib_tceformsInlineHook.

Returns:
void

Definition at line 143 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, and t3lib_div\getUserObj().

Referenced by init().

t3lib_TCEforms_inline::isAssociativeArray ( object)

Checks whether an object is an associative array.

Parameters:
mixed$object,:The object to be checked
Returns:
boolean Returns true, if the object is an associative array

Definition at line 2244 of file class.t3lib_tceforms_inline.php.

Referenced by arrayCompareComplex().

t3lib_TCEforms_inline::isInlineChildAndLabelField ( table,
field 
)

Checks if the $table is the child of a inline type AND the $field is the label field of this table. This function is used to dynamically update the label while editing. This has no effect on labels, that were processed by a TCEmain-hook on saving.

Parameters:
string$table,:The table to check
string$field,:The field on this table to check
Returns:
boolean is inline child and field is responsible for the label

Definition at line 2119 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, and getStructureLevel().

t3lib_TCEforms_inline::normalizeUid ( string)

Normalize a relation "uid" published by transferData, like "1|Company%201"

Parameters:
string$string,:A transferData reference string, containing the uid
Returns:
string The normalized uid

Definition at line 2060 of file class.t3lib_tceforms_inline.php.

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::parseStructureString ( string,
loadConfig = TRUE 
)

Convert the DOM object-id of an inline container to an array. The object-id could look like 'data-parentPageId-tx_mmftest_company-1-employees'. The result is written to $this->inlineStructure. There are two keys:

  • 'stable': Containing full qualified identifiers (table, uid and field)
  • 'unstable': Containting partly filled data (e.g. only table and possibly field)
Parameters:
string$domObjectId,:The DOM object-id
boolean$loadConfig,:Load the TCA configuration for that level (default: true)
Returns:
void

Definition at line 1869 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, t3lib_BEfunc\getInlineLocalizationMode(), t3lib_div\loadTCA(), and updateStructureNames().

t3lib_TCEforms_inline::popStructure ( )

Remove the item on top of the structure stack and return it.

Returns:
array The top item of the structure stack - array(<table>,<uid>,<field>,<config>)

Definition at line 1747 of file class.t3lib_tceforms_inline.php.

References updateStructureNames().

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::processAjaxRequest ( params,
ajaxObj 
)

General processor for AJAX requests concerning IRRE. (called by typo3/ajax.php)

Parameters:
array$params,:additional parameters (not used here)
TYPO3AJAX$ajaxObj,:the TYPO3AJAX object of this request
Returns:
void

Definition at line 988 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::processAjaxRequestConstruct ( &$  ajaxArguments) [protected]

Construct runtime environment for Inline Relational Record Editing.

  • creates an anoymous SC_alt_doc in $GLOBALS['SOBE']
  • creates a t3lib_TCEforms in $GLOBALS['SOBE']->tceforms
  • sets ourself as reference to $GLOBALS['SOBE']->tceforms->inline
  • sets $GLOBALS['SOBE']->tceforms->RTEcounter to the current situation on client-side
Parameters:
array&$ajaxArguments,:The arguments to be processed by the AJAX request
Returns:
void

Definition at line 1029 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::pushStructure ( table,
uid,
field = '',
config = array() 
)

Add a new level on top of the structure stack. Other functions can access the stack and determine, if there's possibly a endless loop.

Parameters:
string$table,:The table name of the record
string$uid,:The uid of the record that embeds the inline data
string$field,:The field name which this element is supposed to edit
array$config,:The TCA-configuration of the inline field
Returns:
void

Definition at line 1730 of file class.t3lib_tceforms_inline.php.

References t3lib_BEfunc\getInlineLocalizationMode(), and updateStructureNames().

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::removeFromArray ( needle,
haystack,
strict = NULL 
)

Remove an element from an array.

Parameters:
mixed$needle,:The element to be removed.
array$haystack,:The array the element should be removed from.
mixed$strict,:Search elements strictly.
Returns:
array The array $haystack without the $needle

Definition at line 2259 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::renderCombinationTable ( &$  rec,
appendFormFieldNames,
config = array() 
)

Render a table with TCEforms, that occurs on a intermediate table but should be editable directly, so two tables are combined (the intermediate table with attributes and the sub-embedded table). -> This is a direct embedding over two levels!

Parameters:
array$rec,:The table record of the child/embedded table (normaly post-processed by t3lib_transferData)
string$appendFormFieldNames,:The [
[<uid>] of the parent record (the intermediate table)
array$config,:content of $PA['fieldConf']['config']
Returns:
string A HTML string with
around.

Definition at line 743 of file class.t3lib_tceforms_inline.php.

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::renderForeignRecord ( parentUid,
rec,
config = array() 
)

Render the form-fields of a related (foreign) record.

Parameters:
string$parentUid,:The uid of the parent (embedding) record (uid or NEW...)
array$rec,:The table record of the child/embedded table (normaly post-processed by t3lib_transferData)
array$config,:content of $PA['fieldConf']['config']
Returns:
string The HTML code for this "foreign record"

Definition at line 363 of file class.t3lib_tceforms_inline.php.

References t3lib_div\_GP(), checkAccess(), getExpandedCollapsedState(), getStructureLevel(), normalizeUid(), renderCombinationTable(), renderForeignRecordHeader(), renderMainFields(), t3lib_div\testInt(), and wrapFormsSection().

Referenced by getRecordDetails(), and getSingleField_typeInline().

t3lib_TCEforms_inline::renderForeignRecordHeader ( parentUid,
foreign_table,
rec,
config,
isVirtualRecord = FALSE 
)

Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc. Later on the command-icons are inserted here.

Parameters:
string$parentUid,:The uid of the parent (embedding) record (uid or NEW...)
string$foreign_table,:The foreign_table we create a header for
array$rec,:The current record of that foreign_table
array$config,:content of $PA['fieldConf']['config']
boolean$isVirtualRecord,:
Returns:
string The HTML code of the header

Definition at line 495 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, t3lib_div\callUserFunction(), t3lib_div\getIndpEnv(), t3lib_BEfunc\getNoRecordTitle(), getPossibleRecordsSelectorConfig(), t3lib_BEfunc\getProcessedValueExtra(), t3lib_BEfunc\getRecordIconAltText(), t3lib_BEfunc\getRecordTitle(), t3lib_BEfunc\getRecordTitlePrep(), t3lib_iconWorks\getSpriteIconForRecord(), t3lib_loadDBGroup\isOnSymmetricSide(), renderForeignRecordHeaderControl(), t3lib_div\revExplode(), t3lib_div\trimExplode(), and wrapWithAnchor().

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::renderForeignRecordHeaderControl ( parentUid,
foreign_table,
rec,
config = array(),
isVirtualRecord = FALSE 
)

Render the control-icons for a record header (create new, sorting, delete, disable/enable). Most of the parts are copy&paste from class.db_list_extra.inc and modified for the JavaScript calls here

Parameters:
string$parentUid,:The uid of the parent (embedding) record (uid or NEW...)
string$foreign_table,:The table (foreign_table) we create control-icons for
array$rec,:The current record of that foreign_table
array$config,:(modified) TCA configuration of the field
Returns:
string The HTML code with the control-icons

Definition at line 577 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, t3lib_BEfunc\getRecord(), t3lib_iconWorks\getSpriteIcon(), t3lib_loadDBGroup\isOnSymmetricSide(), and t3lib_BEfunc\readPageAccess().

Referenced by renderForeignRecordHeader().

t3lib_TCEforms_inline::renderMainFields ( table,
row 
) [protected]

Wrapper for TCEforms::getMainFields().

Parameters:
string$table,:The table name
array$row,:The record to be rendered
Returns:
string The rendered form

Definition at line 467 of file class.t3lib_tceforms_inline.php.

References $content, and $row.

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::renderPossibleRecordsSelector ( selItems,
conf,
uniqueIds = array() 
)

Get a selector as used for the select type, to select from all available records and to create a relation to the embedding record (e.g. like MM).

Parameters:
array$selItems,:Array of all possible records
array$conf,:TCA configuration of the parent(!) field
array$uniqueIds,:The uids that have already been used and should be unique
Returns:
string A HTML <select> box with all possible records

Definition at line 798 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline().

t3lib_TCEforms_inline::renderPossibleRecordsSelectorTypeGroupDB ( conf,
&$  PA 
)

Generate a link that opens an element browser in a new window. For group/db there is no way o use a "selector" like a <select>|</select>-box.

Parameters:
array$conf,:TCA configuration of the parent(!) field
array$PA,:An array with additional configuration options
Returns:
string A HTML link that opens an element browser in a new window

Definition at line 895 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::renderPossibleRecordsSelectorTypeSelect ( selItems,
conf,
&$  PA,
uniqueIds = array() 
)

Get a selector as used for the select type, to select from all available records and to create a relation to the embedding record (e.g. like MM).

Parameters:
array$selItems,:Array of all possible records
array$conf,:TCA configuration of the parent(!) field
array$PA,:An array with additional configuration options
array$uniqueIds,:The uids that have already been used and should be unique
Returns:
string A HTML <select> box with all possible records

Definition at line 825 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::setExpandedCollapsedState ( domObjectId,
expand,
collapse 
)

Save the expanded/collapsed state of a child record in the BE_USER->uc.

Parameters:
string$domObjectId,:The calling object in hierarchy, that requested a new record.
string$expand,:Whether this record is expanded.
string$collapse,:Whether this record is collapsed.
Returns:
void

Definition at line 1369 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::skipField ( table,
field,
row,
config 
)

Check, if a field should be skipped, that was defined to be handled as foreign_field or foreign_sortby of the parent record of the "inline"-type - if so, we have to skip this field - the rendering is done via "inline" as hidden field

Parameters:
string$table,:The table name
string$field,:The field name
array$row,:The record row from the database
array$config,:TCA configuration of the field
Returns:
boolean Determines whether the field should be skipped.

Definition at line 2353 of file class.t3lib_tceforms_inline.php.

References $row, compareStructureConfiguration(), getStructureDepth(), getStructureLevel(), and t3lib_loadDBGroup\isOnSymmetricSide().

t3lib_TCEforms_inline::synchronizeLocalizeRecords ( domObjectId,
type 
) [protected]

Handle AJAX calls to localize all records of a parent, localize a single record or to synchronize with the original language parent.

Parameters:
string$domObjectId,:The calling object in hierarchy, that requested a new record.
mixed$type,:Defines the type 'localize' or 'synchronize' (string) or a single uid to be localized (integer)
Returns:
array An array to be used for JSON

Definition at line 1222 of file class.t3lib_tceforms_inline.php.

References getCommonScriptCalls(), getExecuteChangesJsonArray(), getRecord(), getStructureLevel(), t3lib_div\inList(), t3lib_div\makeInstance(), and t3lib_div\testInt().

t3lib_TCEforms_inline::updateInlineView ( &$  uc,
tce 
)

Update expanded/collapsed states on new inline records if any.

Parameters:
array$uc,:The uc array to be processed and saved (by reference)
t3lib_TCEmain$tce,:Instance of TCEmain that saved data before
Returns:
void

Definition at line 2426 of file class.t3lib_tceforms_inline.php.

References $GLOBALS, and $inlineView.

Referenced by SC_alt_doc\processData().

t3lib_TCEforms_inline::updateStructureNames ( )

For common use of DOM object-ids and form field names of a several inline-level, these names/identifiers are preprocessed and set to $this->inlineNames. This function is automatically called if a level is pushed to or removed from the inline structure stack.

Returns:
void

Definition at line 1764 of file class.t3lib_tceforms_inline.php.

References getStructureItemName(), getStructureLevel(), and getStructurePath().

Referenced by parseStructureString(), popStructure(), and pushStructure().

t3lib_TCEforms_inline::wrapFormsSection ( section,
styleAttrs = array(),
tableAttrs = array() 
)

Wrap the HTML code of a section with a table tag.

Parameters:
string$section,:The HTML code to be wrapped
array$styleAttrs,:Attributes for the style argument in the table tag
array$tableAttrs,:Attributes for the table tag (like width, border, etc.)
Returns:
string The wrapped HTML code

Definition at line 2074 of file class.t3lib_tceforms_inline.php.

References $value.

Referenced by renderForeignRecord().

t3lib_TCEforms_inline::wrapWithAnchor ( text,
link,
attributes = array() 
) [protected]

Wraps a text with an anchor and returns the HTML representation.

Parameters:
string$text,:The text to be wrapped by an anchor
string$link,:The link to be used in the anchor
array$attributes,:Array of attributes to be used in the anchor
Returns:
string The wrapped texted as HTML representation

Definition at line 2534 of file class.t3lib_tceforms_inline.php.

References $value.

Referenced by renderForeignRecordHeader().


Member Data Documentation

t3lib_TCEforms_inline::$backPath

Definition at line 103 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$fObj

Definition at line 102 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$hookObjects = array() [protected]

Definition at line 118 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$inlineCount = 0

Definition at line 111 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$inlineData = array()

Definition at line 109 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$inlineFirstPid

Definition at line 107 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$inlineNames = array()

Definition at line 108 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$inlineStructure = array()

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

t3lib_TCEforms_inline::$inlineStyles = array()

Definition at line 112 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$inlineView = array()

Definition at line 110 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline(), and updateInlineView().

t3lib_TCEforms_inline::$isAjaxCall = FALSE

Definition at line 105 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$prependCmdFieldNames

Definition at line 116 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$prependFormFieldNames

Definition at line 115 of file class.t3lib_tceforms_inline.php.

t3lib_TCEforms_inline::$prependNaming = 'data'

Definition at line 114 of file class.t3lib_tceforms_inline.php.

Definition at line 95 of file class.t3lib_tceforms_inline.php.

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

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

Referenced by t3lib_TCEforms\getSingleField().


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