‪TYPO3CMS  9.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)
 
 moveRecord ($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, DataHandler $dataHandler)
 
 writeRemappedForeignField (RelationHandler $dbAnalysis, array $configuration, $parentId)
 
 updateInlineForeignFieldSorting ($parentTableName, $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

 moveRecord_processFields (DataHandler $dataHandler, $resolvedPageId, $table, $uid)
 
 moveRecord_processFieldValue (DataHandler $dataHandler, $resolvedPageId, $table, $uid, $field, $value, array $configuration)
 
 notifyStageChange (array $stat, $stageId, $table, $id, $comment, DataHandler $dataHandler, array $notificationAlternativeRecipients=[])
 
array getEmailsForStageChangeNotification ($listOfUsers, $noTablePrefix=false)
 
 version_setStage ($table, $id, $stageId, $comment='', $notificationEmailInfo=false, DataHandler $dataHandler, array $notificationAlternativeRecipients=[])
 
 version_swap ($table, $id, $swapWith, $swapIntoWS=false, DataHandler $dataHandler, $comment='', $notificationEmailInfo=false, $notificationAlternativeRecipients=[])
 
 version_swap_processFields ($tableName, $fieldName, array $configuration, array $liveData, array $versionData, DataHandler $dataHandler)
 
 version_clearWSID ($table, $id, $flush=false, DataHandler $dataHandler)
 
 resetStageOfElements ($stageId)
 
 flushWorkspaceElements ($workspaceId)
 
array getTcaTables ()
 
DataHandler getDataHandler ()
 
 flushWorkspaceCacheEntriesByWorkspaceId ($workspaceId)
 
 moveRecord_wsPlaceholders ($table, $uid, $destPid, $wsUid, DataHandler $dataHandler)
 
array getUniqueFields ($table)
 
RelationHandler createRelationHandlerInstance ()
 
LanguageService getLanguageService ()
 

Protected Attributes

array $notificationEmailInfo = array( )
 
array $remappedIds = array( )
 
WorkspaceService $workspaceService
 

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 46 of file DataHandlerHook.php.

Member Function Documentation

◆ createRelationHandlerInstance()

◆ 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 1440 of file DataHandlerHook.php.

References $GLOBALS.

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 1371 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

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 publisg 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 1498 of file DataHandlerHook.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

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 1553 of file DataHandlerHook.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

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

◆ flushWorkspaceCacheEntriesByWorkspaceId()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::flushWorkspaceCacheEntriesByWorkspaceId (   $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 1352 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Service\WorkspaceService\SELECT_ALL_WORKSPACES.

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

◆ flushWorkspaceElements()

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

Flushes elements of a particular workspace to avoid orphan records.

Parameters
int$workspaceId‪The workspace to be flushed

Definition at line 1299 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getDataHandler(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getTcaTables(), and TYPO3\CMS\Backend\Utility\BackendUtility\isTableWorkspaceEnabled().

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 1678 of file DataHandlerHook.php.

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

◆ getDataHandler()

DataHandler TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getDataHandler ( )
protected

◆ getEmailsForStageChangeNotification()

array TYPO3\CMS\Workspaces\Hook\DataHandlerHook::getEmailsForStageChangeNotification (   $listOfUsers,
  $noTablePrefix = false 
)
protected

Return be_users that should be notified on stage change from input list. previously called notifyStageChange_getEmails() in DataHandler

Parameters
string$listOfUsers‪List of backend users, on the form "be_users_10,be_users_2" or "10,2" in case noTablePrefix is set.
bool$noTablePrefix‪If set, the input list are integers and not strings.
Returns
‪array Array of emails

Definition at line 694 of file DataHandlerHook.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\BEenableFields(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecord().

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

◆ getLanguageService()

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

◆ getTcaTables()

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

Gets all defined TCA tables.

Returns
‪array

Definition at line 1334 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 1695 of file DataHandlerHook.php.

References $GLOBALS.

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 319 of file DataHandlerHook.php.

References TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Backend\Utility\BackendUtility\getMovePlaceholder(), TYPO3\CMS\Backend\Utility\BackendUtility\getWorkspaceVersionOfRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\isRecordCopied(), TYPO3\CMS\Backend\Utility\BackendUtility\isTableWorkspaceEnabled(), TYPO3\CMS\Core\Versioning\VersionState\MOVE_PLACEHOLDER, TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_processFields(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_wsPlaceholders(), TYPO3\CMS\Core\DataHandling\DataHandler\newlog(), and TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord().

◆ 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 404 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getWorkspaceVersionOfRecord(), 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,
  $field,
  $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$field‪Name of the field 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 437 of file DataHandlerHook.php.

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

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

◆ moveRecord_wsPlaceholders()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::moveRecord_wsPlaceholders (   $table,
  $uid,
  $destPid,
  $wsUid,
DataHandler  $dataHandler 
)
protected

Creates a move placeholder for workspaces. USE ONLY INTERNALLY Moving placeholder: Can be done because the system sees it as a placeholder for NEW elements like t3ver_state=VersionState::NEW_PLACEHOLDER Moving original: Will either create the placeholder if it doesn't exist or move existing placeholder in workspace.

Parameters
string$table‪Table name to move
int$uid‪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$wsUid‪UID of offline version of online record
DataHandler$dataHandlerDataHandler object
See also
moveRecord()

Definition at line 1576 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getMovePlaceholder(), TYPO3\CMS\Core\DataHandling\DataHandler\getPlaceholderTitleForTableLabel(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\insertDB(), TYPO3\CMS\Core\Versioning\VersionState\MOVE_PLACEHOLDER, TYPO3\CMS\Core\Versioning\VersionState\MOVE_POINTER, TYPO3\CMS\Core\DataHandling\DataHandler\moveL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\moveRecord_raw(), TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW, and TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess().

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

◆ notifyStageChange()

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

Send an email notification to users in workspace

Parameters
array$stat‪Workspace access array from \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkWorkspace()
int$stageId‪New Stage number: 0 = editing, 1= just ready for review, 10 = ready for publication, -1 = rejected!
string$table‪Table name of element (or list of element names if $id is zero)
int$id‪Record uid of element (if zero, then $table is used as reference to element(s) alone)
string$comment‪User comment sent along with action
DataHandler$dataHandlerDataHandler object
array$notificationAlternativeRecipients‪List of recipients to notify instead of be_users selected by sys_workspace, list is generated by workspace extension module

Definition at line 482 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Core\DataHandling\DataHandler\eventPid(), TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getEmailsForStageChangeNotification(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getLanguageService(), TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

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

◆ 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 92 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_clearWSID(), 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 148 of file DataHandlerHook.php.

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

◆ 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 74 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()

◆ 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 295 of file DataHandlerHook.php.

References 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.

◆ resetStageOfElements()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::resetStageOfElements (   $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 resetted

Definition at line 1265 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getTcaTables(), TYPO3\CMS\Backend\Utility\BackendUtility\isTableWorkspaceEnabled(), and TYPO3\CMS\Workspaces\Service\StagesService\STAGE_EDIT_ID.

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

◆ updateInlineForeignFieldSorting()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::updateInlineForeignFieldSorting (   $parentTableName,
  $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$parentTableName
string$parentId
string$foreignTableName
int[]$foreignIds
array$configuration
int$targetWorkspaceId

Definition at line 1170 of file DataHandlerHook.php.

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

◆ version_clearWSID()

◆ version_setStage()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::version_setStage (   $table,
  $id,
  $stageId,
  $comment = '',
  $notificationEmailInfo = false,
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
bool$notificationEmailInfo‪Accumulate state changes in memory for compiled notification email?
DataHandler$dataHandlerDataHandler object
array$notificationAlternativeRecipients‪comma separated list of recipients to notify instead of normal be_users

Definition at line 729 of file DataHandlerHook.php.

References TYPO3\CMS\Workspaces\Hook\DataHandlerHook\$notificationEmailInfo, TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\eventPid(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\DataHandling\DataHandler\newlog(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\notifyStageChange().

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

◆ version_swap()

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

Swapping 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!
bool$swapIntoWS‪If set, swaps online into workspace instead of publishing out of workspace.
DataHandler$dataHandlerDataHandler object
string$comment‪Notification comment
bool$notificationEmailInfo‪Accumulate state changes in memory for compiled notification email?
array$notificationAlternativeRecipients‪comma separated list of recipients to notificate instead of normal be_users

Definition at line 790 of file DataHandlerHook.php.

References $GLOBALS, TYPO3\CMS\Workspaces\Hook\DataHandlerHook\$notificationEmailInfo, TYPO3\CMS\Core\DataHandling\DataHandler\addRemapStackRefIndex(), TYPO3\CMS\Core\DataHandling\DataHandler\checkRecordUpdateAccess(), TYPO3\CMS\Core\DataHandling\DataHandler\compareFieldArrayWithCurrentAndUnset(), TYPO3\CMS\Core\Versioning\VersionState\DEFAULT_STATE, 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\Backend\Utility\BackendUtility\getMovePlaceholder(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordProperties(), TYPO3\CMS\Core\DataHandling\DataHandler\getRecordPropertiesFromRow(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\getUniqueFields(), TYPO3\CMS\Core\Core\Environment\getVarPath(), TYPO3\CMS\Core\DataHandling\DataHandler\hasDeletedRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\isTableWorkspaceEnabled(), TYPO3\CMS\Core\DataHandling\DataHandler\log(), TYPO3\CMS\Core\DataHandling\DataHandler\newlog(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\notifyStageChange(), TYPO3\CMS\Core\DataHandling\DataHandler\registerRecordIdForPageCacheClearing(), TYPO3\CMS\Core\DataHandling\DataHandler\setHistory(), TYPO3\CMS\Core\Localization\LanguageService\sL(), TYPO3\CMS\Core\DataHandling\DataHandler\version_remapMMForVersionSwap(), and TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap_processFields().

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

◆ version_swap_processFields()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::version_swap_processFields (   $tableName,
  $fieldName,
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
string$fieldName,‪Field 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 1119 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().

◆ writeRemappedForeignField()

TYPO3\CMS\Workspaces\Hook\DataHandlerHook::writeRemappedForeignField ( RelationHandler  $dbAnalysis,
array  $configuration,
  $parentId 
)

Writes remapped foreign field (IRRE).

Parameters
RelationHandler$dbAnalysis‪Instance that holds the sorting order of child records
array$configuration‪The TCA field configuration
int$parentId‪The uid of the parent record

Definition at line 1098 of file DataHandlerHook.php.

References TYPO3\CMS\Core\Database\RelationHandler\writeForeignField().

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. previously called "accumulateForNotifEmail" in DataHandler

Definition at line 54 of file DataHandlerHook.php.

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

◆ $remappedIds

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

Contains remapped IDs.

Definition at line 60 of file DataHandlerHook.php.

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

◆ $workspaceService

WorkspaceService TYPO3\CMS\Workspaces\Hook\DataHandlerHook::$workspaceService
protected

Definition at line 64 of file DataHandlerHook.php.