Documentation TYPO3 par Ameos

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=array())
 renderForeignRecordHeaderControl ($parentUid, $foreign_table, $rec, $config=array())
 renderCombinationTable (&$rec, $appendFormFieldNames, $config=array())
 renderPossibleRecordsSelector ($selItems, $conf, $uniqueIds=array())
 renderPossibleRecordsSelectorTypeSelect ($selItems, $conf, &$PA, $uniqueIds=array())
 renderPossibleRecordsSelectorTypeGroupDB ($conf, &$PA)
 getNewRecordLink ($objectPrefix, $conf=array())
 addJavaScriptSortable ($objectId)
 createNewRecord ($domObjectId, $foreignUid=0)
 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)
 getStructureLevel ($level)
 getStructurePath ($structureDepth=-1)
 parseStructureString ($string, $loadConfig=false)
 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)
 getJSON ($jsonArray)
 getExpandedCollapsedState ($table, $uid)
 updateInlineView (&$uc, &$tce)
 getLevelMargin ()

Public Attributes

 $fObj
 $backPath
 $inlineStructure = array()
 $inlineFirstPid
 $inlineNames = array()
 $inlineData = array()
 $inlineView = array()
 $inlineCount = 0
 $inlineStyles = array()
 $prependNaming = 'data'
 $prependFormFieldNames
 $prependCmdFieldNames

Detailed Description

[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 90 of file class.t3lib_tceforms_inline.php.


Member Function Documentation

t3lib_TCEforms_inline::init ( &$  tceForms  ) 

Intialize an instance of t3lib_TCEforms_inline

Parameters:
object $tceForms: Reference to an TCEforms instance
Returns:
void

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

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 132 of file class.t3lib_tceforms_inline.php.

References $inlineView, addJavaScriptSortable(), checkConfiguration(), getNewRecordLink(), getPossibleRecords(), getPossibleRecordsFlat(), getPossibleRecordsSelectorConfig(), t3lib_BEfunc::getRecord(), getRelatedRecords(), getStructureDepth(), getStructureLevel(), getUniqueIds(), t3lib_div::intInRange(), t3lib_div::loadTCA(), popStructure(), pushStructure(), renderForeignRecord(), renderPossibleRecordsSelector(), and t3lib_div::testInt().

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 287 of file class.t3lib_tceforms_inline.php.

References checkAccess(), getExpandedCollapsedState(), getStructureLevel(), normalizeUid(), renderCombinationTable(), renderForeignRecordHeader(), t3lib_div::testInt(), and wrapFormsSection().

Referenced by createNewRecord(), and getSingleField_typeInline().

t3lib_TCEforms_inline::renderForeignRecordHeader ( parentUid,
foreign_table,
rec,
config = array() 
)

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']
Returns:
string The HTML code of the header

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

References t3lib_div::callUserFunction(), t3lib_BEfunc::getNoRecordTitle(), getPossibleRecordsSelectorConfig(), t3lib_BEfunc::getProcessedValueExtra(), t3lib_BEfunc::getRecordIconAltText(), t3lib_BEfunc::getRecordTitle(), t3lib_BEfunc::getRecordTitlePrep(), t3lib_loadDBGroup::isOnSymmetricSide(), renderForeignRecordHeaderControl(), t3lib_div::revExplode(), and t3lib_div::trimExplode().

Referenced by renderForeignRecord().

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

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 438 of file class.t3lib_tceforms_inline.php.

References t3lib_BEfunc::getRecord(), t3lib_loadDBGroup::isOnSymmetricSide(), t3lib_BEfunc::isRecordLocked(), and t3lib_BEfunc::readPageAccess().

Referenced by renderForeignRecordHeader().

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 560 of file class.t3lib_tceforms_inline.php.

References getNewRecord(), getRecord(), t3lib_div::testInt(), and wrapFormsSection().

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 615 of file class.t3lib_tceforms_inline.php.

References getPossibleRecordsSelectorConfig(), renderPossibleRecordsSelectorTypeGroupDB(), and renderPossibleRecordsSelectorTypeSelect().

Referenced by getSingleField_typeInline().

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 642 of file class.t3lib_tceforms_inline.php.

References t3lib_div::intInRange().

Referenced by renderPossibleRecordsSelector().

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 710 of file class.t3lib_tceforms_inline.php.

Referenced by renderPossibleRecordsSelector().

t3lib_TCEforms_inline::getNewRecordLink ( objectPrefix,
conf = array() 
)

Creates a link/button to create new records

Parameters:
string $objectPrefix: The "path" to the child record to create (e.g. '[parten_table][parent_uid][parent_field][child_table]')
array $conf: TCA configuration of the parent(!) field
Returns:
string The HTML code for the new record link

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

Referenced by getSingleField_typeInline().

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 761 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline().

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:
string A JSON string

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

References getJSON(), getNewRecord(), getPossibleRecordsSelectorConfig(), getRecord(), getStructureLevel(), parseStructureString(), renderForeignRecord(), and t3lib_div::testInt().

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 877 of file class.t3lib_tceforms_inline.php.

References $inlineView, getStructureLevel(), parseStructureString(), removeFromArray(), t3lib_div::testInt(), and t3lib_div::trimExplode().

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

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

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

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

References getRecord(), and t3lib_div::trimExplode().

Referenced by getSingleField_typeInline().

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

Get possible records. Copied from TCEform and modified.

Parameters:
string The table name of the record
string The field name which this element is supposed to edit
array The record data array where the value(s) for the field can be found
array An 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 960 of file class.t3lib_tceforms_inline.php.

References getPossibleRecordsSelectorConfig(), t3lib_div::inList(), and t3lib_div::trimExplode().

Referenced by getSingleField_typeInline().

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 1011 of file class.t3lib_tceforms_inline.php.

References t3lib_div::trimExplode().

Referenced by getSingleField_typeInline().

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 empty if a new one 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 1044 of file class.t3lib_tceforms_inline.php.

References t3lib_div::makeInstance().

Referenced by createNewRecord(), getNewRecord(), getRelatedRecords(), and renderCombinationTable().

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 1068 of file class.t3lib_tceforms_inline.php.

References getRecord().

Referenced by createNewRecord(), and renderCombinationTable().

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 1090 of file class.t3lib_tceforms_inline.php.

References updateStructureNames().

Referenced by getSingleField_typeInline().

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 1106 of file class.t3lib_tceforms_inline.php.

References updateStructureNames().

Referenced by getSingleField_typeInline().

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 1123 of file class.t3lib_tceforms_inline.php.

References getStructureItemName(), and getStructureLevel().

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

t3lib_TCEforms_inline::getStructureItemName ( levelData  ) 

Create a name/id for usage in HTML output of a level of the structure stack.

Parameters:
array $levelData: Array of a level of the structure stack (containing the keys table, uid and field)
Returns:
string The name/id of that level, to be used for HTML output

Definition at line 1145 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 1163 of file class.t3lib_tceforms_inline.php.

Referenced by compareStructureConfiguration(), createNewRecord(), getSingleField_typeInline(), getStructurePath(), isInlineChildAndLabelField(), renderForeignRecord(), setExpandedCollapsedState(), skipField(), 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 consists looks like [
[<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 1180 of file class.t3lib_tceforms_inline.php.

References getStructureItemName(), and getStructureLevel().

t3lib_TCEforms_inline::parseStructureString ( string,
loadConfig = false 
)

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

Parameters:
string $domObjectId: The DOM object-id
boolean $loadConfig: Load the TCA configuration for that level
Returns:
void

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

References t3lib_div::loadTCA(), and updateStructureNames().

Referenced by createNewRecord(), and setExpandedCollapsedState().

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
Returns:
boolean If critical configuration errors were found, false is returned

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

Referenced by getSingleField_typeInline().

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 1285 of file class.t3lib_tceforms_inline.php.

References t3lib_BEfunc::fixVersioningPid(), and t3lib_BEfunc::getRecord().

Referenced by renderForeignRecord().

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 1345 of file class.t3lib_tceforms_inline.php.

References arrayCompareComplex(), and getStructureLevel().

Referenced by skipField().

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 1359 of file class.t3lib_tceforms_inline.php.

Referenced by renderForeignRecord().

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 1373 of file class.t3lib_tceforms_inline.php.

Referenced by renderCombinationTable(), and renderForeignRecord().

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 1402 of file class.t3lib_tceforms_inline.php.

References getStructureLevel().

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 1418 of file class.t3lib_tceforms_inline.php.

Referenced by getSingleField_typeInline(), and skipField().

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 1455 of file class.t3lib_tceforms_inline.php.

References isAssociativeArray().

Referenced by compareStructureConfiguration().

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 1509 of file class.t3lib_tceforms_inline.php.

Referenced by arrayCompareComplex().

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 1524 of file class.t3lib_tceforms_inline.php.

Referenced by setExpandedCollapsedState().

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 1539 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 1555 of file class.t3lib_tceforms_inline.php.

References getPossibleRecordsSelectorType().

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

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 1595 of file class.t3lib_tceforms_inline.php.

Referenced by getPossibleRecordsSelectorConfig().

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 1616 of file class.t3lib_tceforms_inline.php.

References compareStructureConfiguration(), getStructureDepth(), getStructureLevel(), and t3lib_loadDBGroup::isOnSymmetricSide().

t3lib_TCEforms_inline::getJSON ( jsonArray  ) 

Creates recursively a JSON literal from a mulidimensional associative array. Uses Services_JSON (http://mike.teczno.com/JSON/doc/)

Parameters:
array $jsonArray: The array (or part of) to be transformed to JSON
Returns:
string If $level>0: part of JSON literal; if $level==0: whole JSON literal wrapped with <script> tags

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

References t3lib_div::makeInstance().

Referenced by createNewRecord().

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 1688 of file class.t3lib_tceforms_inline.php.

Referenced by renderForeignRecord().

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)
object $tce: Instance of TCEmain that saved data before (by reference)
Returns:
void

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

References $inlineView.

Referenced by SC_alt_doc::processData().

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 1734 of file class.t3lib_tceforms_inline.php.


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


Généré par TYPO3 Ameos avec  doxygen 1.4.6