‪TYPO3CMS  11.5
TYPO3\CMS\Workspaces\Hook\DataHandlerHook Class Reference

Public Member Functions

 processCmdmap_beforeStart (DataHandler $dataHandler)
 
 processCmdmap ($command, $table, $id, $value, &$commandIsProcessed, DataHandler $dataHandler)
 
 processCmdmap_afterFinish (DataHandler $dataHandler)
 
 processCmdmap_deleteAction ($table, $id, array $record, &$recordWasDeleted, DataHandler $dataHandler)
 
 processCmdmap_postProcess ($command, $table, $id, $value, DataHandler $dataHandler)
 
 processDatamap_afterAllOperations (DataHandler $dataHandler)
 
 moveRecord ($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, DataHandler $dataHandler)
 
 updateInlineForeignFieldSorting ($parentId, $foreignTableName, $foreignIds, array $configuration, $targetWorkspaceId)
 
array findPageElementsForVersionSwap ($table, $id, $offlineId)
 
 findPageElementsForVersionStageChange (array $pageIdList, $workspaceId, array &$elementList)
 
 findPageIdsForVersionStateChange ($table, array $idList, $workspaceId, array &$pageIdList, array &$elementList)
 
 findRealPageIds (array &$idList)
 
CommandMap getCommandMap (DataHandler $dataHandler)
 

Protected Member Functions

 sendStageChangeNotification (array $accumulatedNotificationInformation, StageChangeNotification $notificationService, DataHandler $dataHandler)
 
 moveRecord_processFields (DataHandler $dataHandler, $resolvedPageId, $table, $uid)
 
 moveRecord_processFieldValue (DataHandler $dataHandler, $resolvedPageId, $table, $uid, $value, array $configuration)
 
 version_setStage ($table, $id, $stageId, string $comment, DataHandler $dataHandler, array $notificationAlternativeRecipients=[])
 
 version_swap ($table, $id, $swapWith, DataHandler $dataHandler, string $comment, $notificationAlternativeRecipients=[])
 
 updateL10nOverlayRecordsOnPublish (string $table, int $liveId, int $previouslyUsedVersionId, int $workspaceId, DataHandler $dataHandler)
 
 version_swap_processFields ($tableName, array $configuration, array $liveData, array $versionData, DataHandler $dataHandler)
 
 publishNewRecord (string $table, array $newRecordInWorkspace, DataHandler $dataHandler, string $comment, array $notificationAlternativeRecipients)
 
 updateReferenceIndexForL10nOverlays (string $table, int $newVersionedRecordId, int $workspaceId, DataHandler $dataHandler)
 
 resetStageOfElements (int $stageId)
 
 flushWorkspaceElements (int $workspaceId)
 
array getTcaTables ()
 
 flushWorkspaceCacheEntriesByWorkspaceId (int $workspaceId)
 
 moveRecord_moveVersionedRecord (string $table, int $liveUid, int $destPid, int $versionedRecordUid, DataHandler $dataHandler)
 
 emitUpdateTopbarSignal ()
 
array getUniqueFields ($table)
 
 softOrHardDeleteSingleRecord (string $table, int $uid)
 
 getRecordHistoryStore (int $workspaceId, BackendUserAuthentication $user)
 
RelationHandler createRelationHandlerInstance ()
 
LanguageService getLanguageService ()
 

Protected Attributes

array $notificationEmailInfo = array( )
 
array $remappedIds = array( )
 

Detailed Description

Contains some parts for staging, versioning and workspaces to interact with the TYPO3 Core Engine

This is a specific hook implementation and is not considered part of the Public TYPO3 API.

Definition at line 49 of file DataHandlerHook.php.

Member Function Documentation

◆ createRelationHandlerInstance()

◆ emitUpdateTopbarSignal()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::emitUpdateTopbarSignal ( )
protected

◆ findPageElementsForVersionStageChange()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::findPageElementsForVersionStageChange ( array  $pageIdList,
  $workspaceId,
array &  $elementList 
)

Searches for all elements from all tables on the given pages in the same workspace.

Parameters
array$pageIdList‪List of PIDs to search
int$workspaceId‪Workspace ID
array$elementList‪List of found elements. Key is table name, value is array of element UIDs

Definition at line 1309 of file DataHandlerHook.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesSetStageBehaviour().

◆ findPageElementsForVersionSwap()

array TYPO3\CMS\Workspaces\Hook\DataHandlerHook::findPageElementsForVersionSwap (   $table,
  $id,
  $offlineId 
)

Finds all elements for swapping versions in workspace

Parameters
string$table‪Table name of the original element to swap
int$id‪UID of the original element to swap (online)
int$offlineId‪As above but offline
Returns
‪array Element data. Key is table name, values are array with first element as online UID, second - offline UID

Definition at line 1240 of file DataHandlerHook.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\DataHandler\CommandMap\addWorkspacesSwapElements(), and TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesSwapBehaviour().

◆ findPageIdsForVersionStateChange()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::findPageIdsForVersionStateChange (   $table,
array  $idList,
  $workspaceId,
array &  $pageIdList,
array &  $elementList 
)

Finds page UIDs for the element from table $table with UIDs from $idList

Parameters
string$table‪Table to search
array$idList‪List of records' UIDs
int$workspaceId‪Workspace ID. We need this parameter because user can be in LIVE but he still can publish DRAFT from ws module!
array$pageIdList‪List of found page UIDs
array$elementList‪List of found element UIDs. Key is table name, value is list of UIDs

Definition at line 1367 of file DataHandlerHook.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesSetStageBehaviour().

◆ findRealPageIds()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::findRealPageIds ( array &  $idList)

Finds real page IDs for state change.

Parameters
array$idList‪List of page UIDs, possibly versioned

Definition at line 1422 of file DataHandlerHook.php.

Referenced by TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesSetStageBehaviour().

◆ flushWorkspaceCacheEntriesByWorkspaceId()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::flushWorkspaceCacheEntriesByWorkspaceId ( int  $workspaceId)
protected

Flushes the workspace cache for current workspace and for the virtual "all workspaces" too.

Parameters
int$workspaceId‪The workspace to be flushed in cache

Definition at line 1222 of file DataHandlerHook.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_afterFinish().

◆ flushWorkspaceElements()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::flushWorkspaceElements ( int  $workspaceId)
protected

Flushes (remove, no soft delete!) elements of a particular workspace to avoid orphan records. This is used if an admin deletes a sys_workspace record.

Parameters
int$workspaceId‪The workspace to be flushed

Definition at line 1150 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getTcaTables(), TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_postProcess().

◆ getCommandMap()

CommandMap TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getCommandMap ( DataHandler  $dataHandler)

Gets an instance of the command map helper.

Parameters
DataHandler$dataHandlerDataHandler object
Returns
‪CommandMap

Definition at line 1489 of file DataHandlerHook.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_beforeStart().

◆ getLanguageService()

LanguageService TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getLanguageService ( )
protected

◆ getRecordHistoryStore()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getRecordHistoryStore ( int  $workspaceId,
BackendUserAuthentication  $user 
)
protected

Makes an instance for RecordHistoryStore. This is needed as DataHandler would usually trigger the setHistory() but has no support for tracking "stage change" information.

So we have to do this manually. Usually a $dataHandler->updateDB() could do this, but we use raw update statements here in workspaces for the time being, mostly because we also want to add "comment"

Definition at line 1559 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getOriginalUserIdWhenInSwitchUserMode(), and TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore\USER_BACKEND.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ getTcaTables()

array TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getTcaTables ( )
protected

Gets all defined TCA tables.

Returns
‪array

Definition at line 1212 of file DataHandlerHook.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceElements(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\resetStageOfElements().

◆ getUniqueFields()

array TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getUniqueFields (   $table)
protected

Returns all fieldnames from a table which have the unique evaluation type set.

Parameters
string$table‪Table name
Returns
‪array Array of fieldnames

Definition at line 1511 of file DataHandlerHook.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ moveRecord()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::moveRecord (   $table,
  $uid,
  $destPid,
array  $propArr,
array  $moveRec,
  $resolvedPid,
$recordWasMoved,
DataHandler  $dataHandler 
)

Hook for \TYPO3\CMS\Core\DataHandling\DataHandler::moveRecord that cares about moving records that are not in the live workspace

Parameters
string$table‪the table of the record
int$uid‪the ID of the record
int$destPid‪Position to move to: $destPid: >=0 then it points to
array$propArr‪Record properties, like header and pid (includes workspace overlay)
array$moveRec‪Record properties, like header and pid (without workspace overlay)
int$resolvedPid‪The final page ID of the record
bool$recordWasMoved‪can be set so that other hooks or
DataHandler$dataHandler

Definition at line 331 of file DataHandlerHook.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Core\Versioning\VersionState\DEFAULT_STATE, TYPO3\CMS\Core\DataHandling\DataHandler\isRecordCopied(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_moveVersionedRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFields(), TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER, TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord(), and TYPO3\CMS\Core\DataHandling\DataHandler\workspaceCannotEditRecord().

◆ moveRecord_moveVersionedRecord()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::moveRecord_moveVersionedRecord ( string  $table,
int  $liveUid,
int  $destPid,
int  $versionedRecordUid,
DataHandler  $dataHandler 
)
protected

Moves a versioned record, which is not new or deleted.

This is critical for a versioned record to be marked as MOVED (t3ver_state=4)

Parameters
string$table‪Table name to move
int$liveUid‪Record uid to move (online record)
int$destPid‪Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
int$versionedRecordUid‪UID of offline version of online record
DataHandler$dataHandlerDataHandler object
See also
moveRecord()

Definition at line 1444 of file DataHandlerHook.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, TYPO3\CMS\Core\DataHandling\DataHandler\moveL10nOverlayRecords(), and TYPO3\CMS\Core\DataHandling\DataHandler\moveRecord_raw().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord().

◆ moveRecord_processFields()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::moveRecord_processFields ( DataHandler  $dataHandler,
  $resolvedPageId,
  $table,
  $uid 
)
protected

Processes fields of a moved record and follows references.

Parameters
DataHandler$dataHandler‪Calling DataHandler instance
int$resolvedPageId‪Resolved real destination page id
string$table‪Name of parent table
int$uid‪UID of the parent record

Definition at line 402 of file DataHandlerHook.php.

References $GLOBALS, and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFieldValue().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord().

◆ moveRecord_processFieldValue()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::moveRecord_processFieldValue ( DataHandler  $dataHandler,
  $resolvedPageId,
  $table,
  $uid,
  $value,
array  $configuration 
)
protected

Processes a single field of a moved record and follows references.

Parameters
DataHandler$dataHandler‪Calling DataHandler instance
int$resolvedPageId‪Resolved real destination page id
string$table‪Name of parent table
int$uid‪UID of the parent record
string$value‪Value of the field of the parent record
array$configuration‪TCA field configuration of the parent record

Definition at line 433 of file DataHandlerHook.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\createRelationHandlerInstance(), TYPO3\CMS\Core\DataHandling\DataHandler\getInlineFieldType(), and TYPO3\CMS\Core\DataHandling\DataHandler\moveRecord().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFields().

◆ processCmdmap()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processCmdmap (   $command,
  $table,
  $id,
  $value,
$commandIsProcessed,
DataHandler  $dataHandler 
)

hook that is called when no prepared command was found

Parameters
string$command‪the command to be executed
string$table‪the table of the record
int$id‪the ID of the record
mixed$value‪the value containing the data
bool$commandIsProcessed‪can be set so that other hooks or
DataHandler$dataHandler‪reference to the main DataHandler object

Definition at line 90 of file DataHandlerHook.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\discard(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_setStage(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), and TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord().

◆ processCmdmap_afterFinish()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processCmdmap_afterFinish ( DataHandler  $dataHandler)

hook that is called AFTER all commands of the commandmap was executed

Parameters
DataHandler$dataHandler‪reference to the main DataHandler object

Definition at line 143 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceCacheEntriesByWorkspaceId(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\sendStageChangeNotification().

◆ processCmdmap_beforeStart()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processCmdmap_beforeStart ( DataHandler  $dataHandler)

hook that is called before any cmd of the commandmap is executed

Parameters
DataHandler$dataHandler‪reference to the main DataHandler object

Definition at line 72 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\DataHandler\CommandMap\get(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getCommandMap(), and TYPO3\CMS\Workspaces\DataHandler\CommandMap\process().

◆ processCmdmap_deleteAction()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processCmdmap_deleteAction (   $table,
  $id,
array  $record,
$recordWasDeleted,
DataHandler  $dataHandler 
)

◆ processCmdmap_postProcess()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processCmdmap_postProcess (   $command,
  $table,
  $id,
  $value,
DataHandler  $dataHandler 
)

In case a sys_workspace_stage record is deleted we do a hard reset for all existing records in that stage to avoid that any of these end up as orphan records.

Parameters
string$command
string$table
string$id
string$value
DataHandler$dataHandler

Definition at line 299 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\emitUpdateTopbarSignal(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceElements(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\resetStageOfElements(), TYPO3\CMS\Workspaces\Service\StagesService\TABLE_STAGE, and TYPO3\CMS\Workspaces\Service\WorkspaceService\TABLE_WORKSPACE.

◆ processDatamap_afterAllOperations()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processDatamap_afterAllOperations ( DataHandler  $dataHandler)

◆ publishNewRecord()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::publishNewRecord ( string  $table,
array  $newRecordInWorkspace,
DataHandler  $dataHandler,
string  $comment,
array  $notificationAlternativeRecipients 
)
protected

When a new record in a workspace is published, there is no "replacing" the online version with the versioned record, but instead the workspace ID and the state is changed.

Parameters
string$table
array$newRecordInWorkspace
DataHandler$dataHandler
string$comment
array$notificationAlternativeRecipients

Definition at line 936 of file DataHandlerHook.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Core\Versioning\VersionState\DEFAULT_STATE, TYPO3\CMS\Core\DataHandling\DataHandler\doesRecordExist(), TYPO3\CMS\Core\DataHandling\DataHandler\eventPid(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getLanguageService(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getRecordHistoryStore(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordPropertiesFromRow(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, TYPO3\CMS\Core\Database\Connection\PARAM_INT, TYPO3\CMS\Core\DataHandling\DataHandler\registerRecordIdForPageCacheClearing(), TYPO3\CMS\Core\DataHandling\DataHandler\registerReferenceIndexRowsForDrop(), TYPO3\CMS\Core\DataHandling\DataHandler\registerReferenceIndexUpdateForReferencesToItem(), TYPO3\CMS\Core\DataHandling\DataHandler\setHistory(), TYPO3\CMS\Core\Localization\LanguageService\sL(), TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID, TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_ID, TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateReferenceIndexForL10nOverlays(), and TYPO3\CMS\Core\DataHandling\DataHandler\updateRefIndex().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ resetStageOfElements()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::resetStageOfElements ( int  $stageId)
protected

In case a sys_workspace_stage record is deleted we do a hard reset for all existing records in that stage to avoid that any of these end up as orphan records.

Parameters
int$stageId‪Elements with this stage are reset

Definition at line 1119 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getTcaTables(), TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Workspaces\Service\StagesService\STAGE_EDIT_ID.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_postProcess().

◆ sendStageChangeNotification()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::sendStageChangeNotification ( array  $accumulatedNotificationInformation,
StageChangeNotification  $notificationService,
DataHandler  $dataHandler 
)
protected

◆ softOrHardDeleteSingleRecord()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::softOrHardDeleteSingleRecord ( string  $table,
int  $uid 
)
protected

Straight db based record deletion: sets deleted = 1 for soft-delete enabled tables, or removes row from table. Used for move placeholder records sometimes.

Definition at line 1530 of file DataHandlerHook.php.

References $GLOBALS, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction().

◆ updateInlineForeignFieldSorting()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::updateInlineForeignFieldSorting (   $parentId,
  $foreignTableName,
  $foreignIds,
array  $configuration,
  $targetWorkspaceId 
)

Updates foreign field sorting values of versioned and live parents after(!) the whole structure has been published.

This method is used as callback function in DataHandlerHook::version_swap_procBasedOnFieldType(). Sorting fields ("sortby") are not modified during the workspace publishing/swapping process directly.

Parameters
string$parentId
string$foreignTableName
int[]$foreignIds
array$configuration
int$targetWorkspaceId

Definition at line 1092 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\$remappedIds, and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\createRelationHandlerInstance().

◆ updateL10nOverlayRecordsOnPublish()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::updateL10nOverlayRecordsOnPublish ( string  $table,
int  $liveId,
int  $previouslyUsedVersionId,
int  $workspaceId,
DataHandler  $dataHandler 
)
protected

If an editor is doing "partial" publishing, the translated children need to be "linked" to the now pointed live record, as if the versioned record (which is deleted) would have never existed.

This is related to the l10n_source and l10n_parent fields.

This needs to happen before the hook calls DataHandler->deleteEl() otherwise the children get deleted as well.

Parameters
string$table‪the database table of the published record
int$liveId‪the live version / online version of the record that was just published
int$previouslyUsedVersionId‪the versioned record ID (wsid>0) which is about to be deleted
int$workspaceId‪the workspace ID
DataHandler$dataHandler

Definition at line 812 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\DataHandling\DataHandler\updateRefIndex().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

◆ updateReferenceIndexForL10nOverlays()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::updateReferenceIndexForL10nOverlays ( string  $table,
int  $newVersionedRecordId,
int  $workspaceId,
DataHandler  $dataHandler 
)
protected

A new record was just published, but the reference index for the localized elements needs an update too.

Parameters
string$table
int$newVersionedRecordId
int$workspaceId
DataHandler$dataHandler

Definition at line 1027 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\DataHandling\DataHandler\updateRefIndex().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord().

◆ version_setStage()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::version_setStage (   $table,
  $id,
  $stageId,
string  $comment,
DataHandler  $dataHandler,
array  $notificationAlternativeRecipients = [] 
)
protected

Setting stage of record

Parameters
string$table‪Table name
int$id
int$stageId‪Stage ID to set
string$comment‪Comment that goes into log
DataHandler$dataHandlerDataHandler object
array$notificationAlternativeRecipients‪comma separated list of recipients to notify instead of normal be_users

Definition at line 481 of file DataHandlerHook.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\eventPid(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getRecordHistoryStore(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), and TYPO3\CMS\Core\DataHandling\DataHandler\workspaceCannotEditOfflineVersion().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap().

◆ version_swap()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::version_swap (   $table,
  $id,
  $swapWith,
DataHandler  $dataHandler,
string  $comment,
  $notificationAlternativeRecipients = [] 
)
protected

Publishing / Swapping (= switching) versions of a record Version from archive (future/past, called "swap version") will get the uid of the "t3ver_oid", the official element with uid = "t3ver_oid" will get the new versions old uid. PIDs are swapped also

Parameters
string$table‪Table name
int$id‪UID of the online record to swap
int$swapWith‪UID of the archived version to swap with!
DataHandler$dataHandlerDataHandler object
string$commentNotification comment
array$notificationAlternativeRecipients‪comma separated list of recipients to notify instead of normal be_users

Definition at line 541 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\compareFieldArrayWithCurrentAndUnset(), TYPO3\CMS\Core\Versioning\VersionState\DEFAULT_STATE, TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER, TYPO3\CMS\Core\DataHandling\DataHandler\deleteEl(), TYPO3\CMS\Core\DataHandling\DataHandler\doesRecordExist(), TYPO3\CMS\Core\DataHandling\DataHandler\eventPid(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getLanguageService(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getRecordHistoryStore(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordPropertiesFromRow(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getUniqueFields(), TYPO3\CMS\Core\DataHandling\DataHandler\hasDeletedRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, TYPO3\CMS\Core\Versioning\VersionState\NEW_PLACEHOLDER, TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, TYPO3\CMS\Workspaces\Hook\DataHandlerHook\publishNewRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\registerRecordIdForPageCacheClearing(), TYPO3\CMS\Core\DataHandling\DataHandler\registerReferenceIndexRowsForDrop(), TYPO3\CMS\Core\DataHandling\DataHandler\setHistory(), TYPO3\CMS\Core\Localization\LanguageService\sL(), TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_EXECUTE_ID, TYPO3\CMS\Workspaces\Service\StagesService\STAGE_PUBLISH_ID, TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateL10nOverlayRecordsOnPublish(), TYPO3\CMS\Core\DataHandling\DataHandler\updateRefIndex(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap_processFields(), and TYPO3\CMS\Core\DataHandling\DataHandler\versionPublishManyToManyRelations().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap().

◆ version_swap_processFields()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::version_swap_processFields (   $tableName,
array  $configuration,
array  $liveData,
array  $versionData,
DataHandler  $dataHandler 
)
protected

Processes fields of a record for the publishing/swapping process. Basically this takes care of IRRE (type "inline") child references.

Parameters
string$tableName‪Table name
array$configuration‪TCA field configuration
array$liveData‪Live record data
array$versionData‪Version record data
DataHandler$dataHandler‪Calling data-handler object

Definition at line 892 of file DataHandlerHook.php.

References TYPO3\CMS\Core\DataHandling\DataHandler\addRemapAction(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\createRelationHandlerInstance(), and TYPO3\CMS\Core\DataHandling\DataHandler\getInlineFieldType().

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap().

Member Data Documentation

◆ $notificationEmailInfo

array TYPO3\CMS\Workspaces\Hook\DataHandlerHook::$notificationEmailInfo = array( )
protected

For accumulating information about workspace stages raised on elements so a single mail is sent as notification.

Definition at line 56 of file DataHandlerHook.php.

◆ $remappedIds

array TYPO3\CMS\Workspaces\Hook\DataHandlerHook::$remappedIds = array( )
protected

Contains remapped IDs.

Definition at line 62 of file DataHandlerHook.php.

Referenced by TYPO3\CMS\Workspaces\Hook\DataHandlerHook\updateInlineForeignFieldSorting().