‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew:
TYPO3\CMS\Backend\Form\FormDataProviderInterface

Public Member Functions

array addData (array $result)
 

Protected Member Functions

array setDefaultsFromUserTsConfig (array $result)
 
array setDefaultsFromPageTsConfig (array $result)
 
array setDefaultsFromNeighborRow (array $result)
 
array setDefaultsFromDefaultValues (array $result)
 
array setDefaultsFromInlineRelations (array $result)
 
array setDefaultsFromInlineParentLanguage (array $result)
 
 setDefaultsFromInlineParentUid (array $result)
 
array setPid (array $result)
 

Detailed Description

On "new" command, initialize new database row with default data

Definition at line 25 of file DatabaseRowInitializeNew.php.

Member Function Documentation

◆ addData()

◆ setDefaultsFromDefaultValues()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromDefaultValues ( array  $result)
protected

Apply default values. These are typically carried around as "defVals" GET vars and set by controllers in $result['defaultValues'] array as init values.

Parameters
array$result‪Result array
Returns
‪array Modified result array

Definition at line 133 of file DatabaseRowInitializeNew.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setDefaultsFromInlineParentLanguage()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromInlineParentLanguage ( array  $result)
protected

If a new child is created in an inline relation via ajax, and if the parent is a localized record, the child should have the same sys_language_uid set in the field declared in ['ctrl']['languageField'] if the child is localizable itself. A localized parent transfers its sys_language_uid via inlineParentConfig['inline']['parentSysLanguageUid'], use that value as default for the child record languageField.

Parameters
array$result‪Result array
Returns
‪array Modified result array
Exceptions

Definition at line 201 of file DatabaseRowInitializeNew.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setDefaultsFromInlineParentUid()

TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromInlineParentUid ( array  $result)
protected

Set the parent uid of inline relations created via ajax to the corresponding foreign field

Parameters
array$result‪Result array

Definition at line 228 of file DatabaseRowInitializeNew.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setDefaultsFromInlineRelations()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromInlineRelations ( array  $result)
protected

Inline scenario if a new intermediate record to an existing child-child is compiled. Set "foreign_selector" field of this intermediate row to given "childChildUid". See TcaDataCompiler array comment of inlineChildChildUid for more details.

Parameters
array$result‪Result array
Returns
‪array Modified result array
Exceptions

Definition at line 157 of file DatabaseRowInitializeNew.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setDefaultsFromNeighborRow()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromNeighborRow ( array  $result)
protected

If a neighbor row is given (if vanillaUid was negative), field can be initialized with values from neighbor for fields registered in TCA['ctrl']['useColumnsForDefaultValues'].

Parameters
array$result‪Result array
Returns
‪array Modified result array

Definition at line 108 of file DatabaseRowInitializeNew.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setDefaultsFromPageTsConfig()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromPageTsConfig ( array  $result)
protected

Set defaults defined by page ts "TCAdefaults"

Parameters
array$result‪Result array
Returns
‪array Modified result array

Definition at line 86 of file DatabaseRowInitializeNew.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setDefaultsFromUserTsConfig()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromUserTsConfig ( array  $result)
protected

Set defaults defined by user ts "TCAdefaults"

Parameters
array$result‪Result array
Returns
‪array Modified result array

Definition at line 64 of file DatabaseRowInitializeNew.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().

◆ setPid()

array TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setPid ( array  $result)
protected

Set the pid. This is either the vanillaUid (see description in FormDataCompiler), or a pid given by page TSconfig for inline children.

Parameters
array$result‪Result array
Returns
‪array Modified result array
Exceptions

Definition at line 248 of file DatabaseRowInitializeNew.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew\addData().