PHP Class FluidTYPO3\Flux\Service\ContentService

Main API Service for interacting with Flux-based FlexForms
Inheritance: implements TYPO3\CMS\Core\SingletonInterface
Datei anzeigen Open project: fluidtypo3/flux Class Usage Examples

Protected Properties

Property Type Description
$recordService FluidTYPO3\Flux\Service\RecordService
$workspacesAwareRecordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService

Public Methods

Method Description
affectRecordByRequestParameters ( mixed $id, array &$row, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
fixPositionInLocalization ( integer $uid, integer $languageUid, array &$defaultLanguageRecord, TYPO3\CMS\Core\DataHandling\DataHandler $reference )
initializeRecord ( String $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
injectRecordService ( FluidTYPO3\Flux\Service\RecordService $recordService ) : void
injectWorkspacesAwareRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $workspacesAwareRecordService ) : void
moveRecord ( array &$row, string &$relativeTo, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void Move the content element depending on various request/row parameters.
pasteAfter ( string $command, array &$row, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void Paste one record after another record.

Protected Methods

Method Description
applyMappingArray ( array $mappingArray, integer $pid, integer $colPos, string $area, integer $parentUid, string $table, integer $relativeUid, array | null $relativeRecord, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
createMappingArray ( string $command, string $subCommand, integer $id, array $row, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : array
getMovePlaceholder ( integer $recordUid ) : array
getPreviousLocalizedRecordUid ( integer $uid, integer $language, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : integer Returning uid of previous localized record, if any, for tables with a "sortby" column Used when new localized records are created so that localized records are sorted in the same order as the default language records
getTargetAreaStoredInSession ( integer $relativeTo ) : array
initializeRecordByNewAndOldAndLanguageUids ( array $row, integer $newUid, integer $oldUid, integer $newLanguageUid, string $languageFieldName, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain )
loadRecordFromDatabase ( integer $uid, integer $languageUid ) : array | null
loadRecordsFromDatabase ( integer $parentUid ) : array | null
updateMovePlaceholder ( array $row ) : void
updateRecordInDatabase ( array $row, integer $uid = NULL ) : void

Method Details

affectRecordByRequestParameters() public method

public affectRecordByRequestParameters ( mixed $id, array &$row, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$id mixed
$row array
$parameters array
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void

applyMappingArray() protected method

protected applyMappingArray ( array $mappingArray, integer $pid, integer $colPos, string $area, integer $parentUid, string $table, integer $relativeUid, array | null $relativeRecord, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$mappingArray array
$pid integer
$colPos integer
$area string
$parentUid integer
$table string
$relativeUid integer
$relativeRecord array | null
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void

createMappingArray() protected method

protected createMappingArray ( string $command, string $subCommand, integer $id, array $row, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : array
$command string
$subCommand string
$id integer
$row array
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return array

fixPositionInLocalization() public method

public fixPositionInLocalization ( integer $uid, integer $languageUid, array &$defaultLanguageRecord, TYPO3\CMS\Core\DataHandling\DataHandler $reference )
$uid integer uid of record in default language
$languageUid integer sys_language_uid of language for the localized record
$defaultLanguageRecord array record in default language (from table tt_content)
$reference TYPO3\CMS\Core\DataHandling\DataHandler

getMovePlaceholder() protected method

protected getMovePlaceholder ( integer $recordUid ) : array
$recordUid integer
return array

getPreviousLocalizedRecordUid() protected method

This is a port from DataHandler::getPreviousLocalizedRecordUid that respects tx_flux_parent and tx_flux_column!
protected getPreviousLocalizedRecordUid ( integer $uid, integer $language, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : integer
$uid integer Uid of default language record
$language integer Language of localization
$reference TYPO3\CMS\Core\DataHandling\DataHandler
return integer uid of record after which the localized record should be inserted

getTargetAreaStoredInSession() protected method

protected getTargetAreaStoredInSession ( integer $relativeTo ) : array
$relativeTo integer
return array

initializeRecord() public method

public initializeRecord ( String $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$id String
$row array
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void

initializeRecordByNewAndOldAndLanguageUids() protected method

protected initializeRecordByNewAndOldAndLanguageUids ( array $row, integer $newUid, integer $oldUid, integer $newLanguageUid, string $languageFieldName, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain )
$row array
$newUid integer
$oldUid integer
$newLanguageUid integer
$languageFieldName string
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler

injectRecordService() public method

public injectRecordService ( FluidTYPO3\Flux\Service\RecordService $recordService ) : void
$recordService FluidTYPO3\Flux\Service\RecordService
return void

injectWorkspacesAwareRecordService() public method

public injectWorkspacesAwareRecordService ( FluidTYPO3\Flux\Service\WorkspacesAwareRecordService $workspacesAwareRecordService ) : void
$workspacesAwareRecordService FluidTYPO3\Flux\Service\WorkspacesAwareRecordService
return void

loadRecordFromDatabase() protected method

protected loadRecordFromDatabase ( integer $uid, integer $languageUid ) : array | null
$uid integer
$languageUid integer
return array | null

loadRecordsFromDatabase() protected method

protected loadRecordsFromDatabase ( integer $parentUid ) : array | null
$parentUid integer
return array | null

moveRecord() public method

Move the content element depending on various request/row parameters.
public moveRecord ( array &$row, string &$relativeTo, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$row array The row which may, may not, trigger moving.
$relativeTo string If not-zero moves record to after this UID (negative) or top of this colPos (positive)
$parameters array List of parameters defining the move operation target
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void

pasteAfter() public method

Paste one record after another record.
public pasteAfter ( string $command, array &$row, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$command string The command which caused pasting - "copy" is targeted in order to determine "reference" pasting.
$row array The record to be pasted, by reference. Changes original $row
$parameters array List of parameters defining the paste operation target
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void

updateMovePlaceholder() protected method

protected updateMovePlaceholder ( array $row ) : void
$row array
return void

updateRecordInDatabase() protected method

protected updateRecordInDatabase ( array $row, integer $uid = NULL ) : void
$row array
$uid integer
return void

Property Details

$recordService protected_oe property

protected RecordService,FluidTYPO3\Flux\Service $recordService
return FluidTYPO3\Flux\Service\RecordService

$workspacesAwareRecordService protected_oe property

protected WorkspacesAwareRecordService,FluidTYPO3\Flux\Service $workspacesAwareRecordService
return FluidTYPO3\Flux\Service\WorkspacesAwareRecordService