![]() |
TYPO3
7.6
|
Public Member Functions | |
processCmdmap_beforeStart (DataHandler $tcemainObj) | |
processCmdmap ($command, $table, $id, $value, &$commandIsProcessed, DataHandler $tcemainObj) | |
processCmdmap_afterFinish (DataHandler $tcemainObj) | |
processCmdmap_deleteAction ($table, $id, array $record, &$recordWasDeleted, DataHandler $tcemainObj) | |
moveRecord ($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, DataHandler $tcemainObj) | |
writeRemappedForeignField (\TYPO3\CMS\Core\Database\RelationHandler $dbAnalysis, array $configuration, $parentId) | |
updateInlineForeignFieldSorting ($parentTableName, $parentId, $foreignTableName, $foreignIds, array $configuration, $targetWorkspaceId) | |
findPageElementsForVersionSwap ($table, $id, $offlineId) | |
findPageElementsForVersionStageChange (array $pageIdList, $workspaceId, array &$elementList) | |
findPageIdsForVersionStateChange ($table, array $idList, $workspaceId, array &$pageIdList, array &$elementList) | |
findRealPageIds (array &$idList) | |
getCommandMap (DataHandler $tceMain) | |
Protected Member Functions | |
moveRecord_processFields (DataHandler $dataHandler, $resolvedPageId, $table, $uid) | |
moveRecord_processFieldValue (DataHandler $dataHandler, $resolvedPageId, $table, $uid, $field, $value, array $configuration) | |
getEmailsForStageChangeNotification ($listOfUsers, $noTablePrefix=false) | |
version_setStage ($table, $id, $stageId, $comment= '', $notificationEmailInfo=false, DataHandler $tcemainObj, array $notificationAlternativeRecipients=array()) | |
versionizePages ($uid, $label, $versionizeTree, DataHandler $tcemainObj) | |
version_swap_processFields ($tableName, $fieldName, array $configuration, array $liveData, array $versionData, DataHandler $dataHandler) | |
version_clearWSID ($table, $id, $flush=false, DataHandler $tcemainObj) | |
rawCopyPageContent ($oldPageId, $newPageId, array $copyTablesArray, DataHandler $tcemainObj) | |
moveRecord_wsPlaceholders ($table, $uid, $destPid, $wsUid, DataHandler $tcemainObj) | |
getPossibleInlineChildTablesOfParentTable ($parentTable, array $possibleInlineChildren=array()) | |
getUniqueFields ($table) | |
createRelationHandlerInstance () | |
Protected Attributes | |
$notificationEmailInfo = array() | |
$remappedIds = array() | |
Contains some parts for staging, versioning and workspaces to interact with the TYPO3 Core Engine
Definition at line 29 of file version/Classes/Hook/DataHandlerHook.php.
|
protected |
Definition at line 1504 of file version/Classes/Hook/DataHandlerHook.php.
References GeneralUtility\makeInstance().
Referenced by DataHandlerHook\moveRecord_processFieldValue(), DataHandlerHook\updateInlineForeignFieldSorting(), and DataHandlerHook\version_swap_processFields().
findPageElementsForVersionStageChange | ( | array | $pageIdList, |
$workspaceId, | |||
array & | $elementList | ||
) |
Searches for all elements from all tables on the given pages in the same workspace.
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 1262 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, and BackendUtility\deleteClause().
findPageElementsForVersionSwap | ( | $table, | |
$id, | |||
$offlineId | |||
) |
Finds all elements for swapping versions in workspace
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 |
Definition at line 1219 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, BackendUtility\deleteClause(), BackendUtility\getRecord(), and BackendUtility\workspaceOL().
findPageIdsForVersionStateChange | ( | $table, | |
array | $idList, | ||
$workspaceId, | |||
array & | $pageIdList, | ||
array & | $elementList | ||
) |
Finds page UIDs for the element from table $table
with UIDs from $idList
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 1294 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, BackendUtility\deleteClause(), BackendUtility\getRecord(), and BackendUtility\workspaceOL().
findRealPageIds | ( | array & | $idList | ) |
Finds real page IDs for state change.
array | $idList | List of page UIDs, possibly versioned |
Definition at line 1323 of file version/Classes/Hook/DataHandlerHook.php.
References BackendUtility\getRecord().
getCommandMap | ( | DataHandler | $tceMain | ) |
Gets an instance of the command map helper.
DataHandler | $tceMain | TCEmain object |
Definition at line 1467 of file version/Classes/Hook/DataHandlerHook.php.
References GeneralUtility\makeInstance().
Referenced by DataHandlerHook\processCmdmap_beforeStart().
|
protected |
Return be_users that should be notified on stage change from input list. previously called notifyStageChange_getEmails() in tcemain
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. |
Definition at line 637 of file version/Classes/Hook/DataHandlerHook.php.
References BackendUtility\BEenableFields(), BackendUtility\getRecord(), GeneralUtility\revExplode(), and GeneralUtility\trimExplode().
|
protected |
Gets all possible child tables that are used on each parent table as field.
string | $parentTable | Name of the parent table |
array | $possibleInlineChildren | Collected possible inline children |
Definition at line 1446 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS.
Referenced by DataHandlerHook\versionizePages().
|
protected |
Returns all fieldnames from a table which have the unique evaluation type set.
string | $table | Table name |
Definition at line 1484 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, and GeneralUtility\trimExplode().
moveRecord | ( | $table, | |
$uid, | |||
$destPid, | |||
array | $propArr, | ||
array | $moveRec, | ||
$resolvedPid, | |||
& | $recordWasMoved, | ||
DataHandler | $tcemainObj | ||
) |
Hook for ::moveRecord that cares about moving records that are not in the live workspace
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 | $tcemainObj |
Definition at line 270 of file version/Classes/Hook/DataHandlerHook.php.
References Enumeration\cast(), elseif, BackendUtility\getMovePlaceholder(), BackendUtility\getWorkspaceVersionOfRecord(), DataHandler\isRecordCopied(), BackendUtility\isTableWorkspaceEnabled(), VersionState\MOVE_PLACEHOLDER, DataHandlerHook\moveRecord_processFields(), DataHandlerHook\moveRecord_wsPlaceholders(), DataHandler\newlog(), and DataHandler\versionizeRecord().
|
protected |
Processes fields of a moved record and follows references.
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 352 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, BackendUtility\getWorkspaceVersionOfRecord(), and DataHandlerHook\moveRecord_processFieldValue().
Referenced by DataHandlerHook\moveRecord().
|
protected |
Processes a single field of a moved record and follows references.
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 382 of file version/Classes/Hook/DataHandlerHook.php.
References Enumeration\cast(), DataHandlerHook\createRelationHandlerInstance(), DataHandler\getInlineFieldType(), BackendUtility\getWorkspaceVersionOfRecord(), BackendUtility\isTableWorkspaceEnabled(), and DataHandler\moveRecord().
Referenced by DataHandlerHook\moveRecord_processFields().
|
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.
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 | $tcemainObj | TCEmain object |
Definition at line 1347 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, elseif, BackendUtility\getMovePlaceholder(), DataHandler\getPlaceholderTitleForTableLabel(), BackendUtility\getRecord(), DataHandler\insertDB(), VersionState\MOVE_PLACEHOLDER, VersionState\MOVE_POINTER, DataHandler\moveL10nOverlayRecords(), DataHandler\moveRecord_raw(), BackendUtility\readPageAccess(), and GeneralUtility\trimExplode().
Referenced by DataHandlerHook\moveRecord().
processCmdmap | ( | $command, | |
$table, | |||
$id, | |||
$value, | |||
& | $commandIsProcessed, | ||
DataHandler | $tcemainObj | ||
) |
hook that is called when no prepared command was found
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 | $tcemainObj | reference to the main tcemain object |
Definition at line 75 of file version/Classes/Hook/DataHandlerHook.php.
References GeneralUtility\trimExplode(), DataHandlerHook\version_clearWSID(), DataHandlerHook\version_setStage(), DataHandlerHook\versionizePages(), and DataHandler\versionizeRecord().
processCmdmap_afterFinish | ( | DataHandler | $tcemainObj | ) |
hook that is called AFTER all commands of the commandmap was executed
DataHandler | $tcemainObj | reference to the main tcemain object |
Definition at line 135 of file version/Classes/Hook/DataHandlerHook.php.
processCmdmap_beforeStart | ( | DataHandler | $tcemainObj | ) |
hook that is called before any cmd of the commandmap is executed
DataHandler | $tcemainObj | reference to the main tcemain object |
Definition at line 56 of file version/Classes/Hook/DataHandlerHook.php.
References DataHandlerHook\getCommandMap().
processCmdmap_deleteAction | ( | $table, | |
$id, | |||
array | $record, | ||
& | $recordWasDeleted, | ||
DataHandler | $tcemainObj | ||
) |
hook that is called when an element shall get deleted
string | $table | the table of the record |
int | $id | the ID of the record |
array | $record | The accordant database record |
bool | $recordWasDeleted | can be set so that other hooks or |
DataHandler | $tcemainObj | reference to the main tcemain object |
Definition at line 157 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, ArrayUtility\arrayDiffAssocRecursive(), Enumeration\cast(), VersionState\DEFAULT_STATE, VersionState\DELETE_PLACEHOLDER, DataHandler\deleteEl(), DataHandler\deleteL10nOverlayRecords(), elseif, BackendUtility\getLiveVersionOfRecord(), BackendUtility\getMovePlaceholder(), BackendUtility\getWorkspaceVersionOfRecord(), VersionState\MOVE_PLACEHOLDER, VersionState\MOVE_POINTER, DataHandler\newlog(), DataHandlerHook\version_clearWSID(), and DataHandler\versionizeRecord().
|
protected |
Copies all records from tables in $copyTablesArray from page with $old_pid to page with $new_pid Uses raw-copy for the operation (meant for versioning!)
int | $oldPageId | Current page id. |
int | $newPageId | New page id |
array | $copyTablesArray | Array of tables from which to copy |
DataHandler | $tcemainObj | TCEmain object |
Definition at line 1190 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, DataHandler\copyRecord_raw(), and DataHandler\deleteClause().
Referenced by DataHandlerHook\versionizePages().
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.
string | $parentTableName | |
string | $parentId | |
string | $foreignTableName | |
int[] | $foreignIds | |
array | $configuration | |
int | $targetWorkspaceId |
Definition at line 1098 of file version/Classes/Hook/DataHandlerHook.php.
References DataHandlerHook\$remappedIds, and DataHandlerHook\createRelationHandlerInstance().
|
protected |
Release version from this workspace (and into "Live" workspace but as an offline version).
string | $table | Table name |
int | $id | Record UID |
bool | $flush | If set, will completely delete element |
DataHandler | $tcemainObj | TCEmain object |
Definition at line 1127 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, Enumeration\cast(), DataHandler\checkRecordUpdateAccess(), VersionState\DELETE_PLACEHOLDER, DataHandler\deleteEl(), BackendUtility\getLiveVersionOfRecord(), BackendUtility\getMovePlaceholder(), BackendUtility\getRecord(), BackendUtility\isTableWorkspaceEnabled(), VersionState\NEW_PLACEHOLDER, and DataHandler\newlog().
Referenced by DataHandlerHook\processCmdmap(), and DataHandlerHook\processCmdmap_deleteAction().
|
protected |
Setting stage of record
string | $table | Table name |
int | $integer | Record UID |
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 | $tcemainObj | TCEmain object |
array | $notificationAlternativeRecipients | comma separated list of recipients to notify instead of normal be_users |
Definition at line 673 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, DataHandlerHook\$notificationEmailInfo, DataHandler\checkRecordUpdateAccess(), elseif, BackendUtility\getRecord(), DataHandler\log(), DataHandler\newlog(), and DataHandler\newlog2().
Referenced by DataHandlerHook\processCmdmap().
|
protected |
Processes fields of a record for the publishing/swapping process. Basically this takes care of IRRE (type "inline") child references.
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 1048 of file version/Classes/Hook/DataHandlerHook.php.
References DataHandler\addRemapAction(), DataHandlerHook\createRelationHandlerInstance(), and DataHandler\getInlineFieldType().
|
protected |
Creates a new version of a page including content and possible subpages.
int | $uid | Page uid to create new version of. |
string | $label | Version label |
int | $versionizeTree | Indicating "treeLevel" - "page" (0) or "branch" (>=1) ["element" type must call versionizeRecord() directly] |
DataHandler | $tcemainObj | TCEmain object |
Definition at line 720 of file version/Classes/Hook/DataHandlerHook.php.
References $GLOBALS, DataHandler\copyRecord_raw(), DataHandler\doesBranchExist(), DataHandlerHook\getPossibleInlineChildTablesOfParentTable(), DataHandler\int_pageTreeInfo(), DataHandler\newlog(), DataHandlerHook\rawCopyPageContent(), and DataHandler\versionizeRecord().
Referenced by DataHandlerHook\processCmdmap().
writeRemappedForeignField | ( | \TYPO3\CMS\Core\Database\RelationHandler | $dbAnalysis, |
array | $configuration, | ||
$parentId | |||
) |
Writes remapped foreign field (IRRE).
\TYPO3\CMS\Core\Database\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 1026 of file version/Classes/Hook/DataHandlerHook.php.
|
protected |
Definition at line 38 of file version/Classes/Hook/DataHandlerHook.php.
Referenced by DataHandlerHook\version_setStage().
|
protected |
Definition at line 45 of file version/Classes/Hook/DataHandlerHook.php.
Referenced by DataHandlerHook\updateInlineForeignFieldSorting().