TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Versioning\VersionState Class Reference
Inheritance diagram for TYPO3\CMS\Core\Versioning\VersionState:
TYPO3\CMS\Core\Type\Enumeration TYPO3\CMS\Core\Type\TypeInterface

Public Member Functions

 indicatesPlaceholder ()
 
- Public Member Functions inherited from TYPO3\CMS\Core\Type\Enumeration
 __construct ($value=null)
 
 equals ($value)
 
 __toString ()
 

Public Attributes

const __default = self::DEFAULT_STATE
 
const NEW_PLACEHOLDER_VERSION = -1
 
const DEFAULT_STATE = 0
 
const NEW_PLACEHOLDER = 1
 
const DELETE_PLACEHOLDER = 2
 
const MOVE_PLACEHOLDER = 3
 
const MOVE_POINTER = 4
 

Additional Inherited Members

- Static Public Member Functions inherited from TYPO3\CMS\Core\Type\Enumeration
static getConstants ($include_default=false)
 
static cast ($value)
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Type\Enumeration
 setValue ($value)
 
 isValid ($value)
 
- Static Protected Member Functions inherited from TYPO3\CMS\Core\Type\Enumeration
static loadValues ()
 
- Protected Attributes inherited from TYPO3\CMS\Core\Type\Enumeration
 $value
 
- Static Protected Attributes inherited from TYPO3\CMS\Core\Type\Enumeration
static $enumConstants
 

Detailed Description

Enumeration object for VersionState

Definition at line 20 of file VersionState.php.

Member Function Documentation

◆ indicatesPlaceholder()

TYPO3\CMS\Core\Versioning\VersionState::indicatesPlaceholder ( )
Returns
bool

Definition at line 75 of file VersionState.php.

References TYPO3\CMS\Core\Type\Enumeration\__toString().

Member Data Documentation

◆ __default

const TYPO3\CMS\Core\Versioning\VersionState::__default = self::DEFAULT_STATE

Definition at line 22 of file VersionState.php.

◆ DEFAULT_STATE

◆ DELETE_PLACEHOLDER

const TYPO3\CMS\Core\Versioning\VersionState::DELETE_PLACEHOLDER = 2

Deleting elements is done by actually creating a new version of the element and setting t3ver_state=2 that indicates the live element must be deleted upon swapping the versions.

Definition at line 52 of file VersionState.php.

Referenced by TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBeCopied(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBeCut(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBePastedAfter(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBePastedInto(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBeRemoved(), TYPO3\CMS\Workspaces\Service\WorkspaceService\canCreatePreviewLink(), TYPO3\CMS\Version\Dependency\ElementEntityProcessor\createClearDependentElementChildReferenceCallback(), TYPO3\CMS\Version\Dependency\ElementEntityProcessor\createClearDependentElementParentReferenceCallback(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteL10nOverlayRecords(), TYPO3\CMS\Frontend\Page\PageRepository\fixVersioningPid(), TYPO3\CMS\Backend\Utility\IconUtility\getIcon(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordIconAltText(), TYPO3\CMS\Backend\View\PageLayoutView\getTable_pages(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\isDeleted(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons(), TYPO3\CMS\Core\Imaging\IconFactory\mapRecordTypeToOverlayIdentifier(), TYPO3\CMS\Version\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\processVersionOverlays(), TYPO3\CMS\Core\Database\RelationHandler\purgeDeletePlaceholder(), TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages(), TYPO3\CMS\Version\Hook\DataHandlerHook\version_clearWSID(), and TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord().

◆ MOVE_PLACEHOLDER

const TYPO3\CMS\Core\Versioning\VersionState::MOVE_PLACEHOLDER = 3

Moving elements is done by first creating a placeholder element which is in fact live but carrying a flag (t3ver_state=3) that makes it invisible online. It also has a field, "t3ver_move_id", holding the uid of the record to move (source record). In addition, a new version of the source record is made and has "t3ver_state" = 4 (move-to pointer). This version is simply necessary in order for the versioning system to have something to publish for the move operation. So in summary, two records are created for a move operation in a workspace: The placeholder (online, with state=3 and t3ver_move_id set) and a new version (state=4) of the online source record (the one being moved).

Definition at line 69 of file VersionState.php.

Referenced by TYPO3\CMS\Backend\Utility\IconUtility\getIcon(), TYPO3\CMS\Frontend\Page\PageRepository\getMovePlaceholder(), TYPO3\CMS\Backend\Utility\BackendUtility\getMovePlaceholder(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getMoveToPlaceHolderFromPages(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordIconAltText(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getWhere(), TYPO3\CMS\Lowlevel\VersionsCommand\main(), TYPO3\CMS\Frontend\Page\PageRepository\movePlhOL(), TYPO3\CMS\Backend\Utility\BackendUtility\movePlhOL(), TYPO3\CMS\Version\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Version\Hook\DataHandlerHook\moveRecord_wsPlaceholders(), TYPO3\CMS\Version\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\processVersionMovePlaceholders(), TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages(), TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

◆ MOVE_POINTER

◆ NEW_PLACEHOLDER

◆ NEW_PLACEHOLDER_VERSION

const TYPO3\CMS\Core\Versioning\VersionState::NEW_PLACEHOLDER_VERSION = -1

If a new record is created in a workspace a version with t3ver_state -1 is created with pid=-1. This record is the version of the "live" record (t3ver_state=1) where changes are stored.

Definition at line 30 of file VersionState.php.

Referenced by TYPO3\CMS\Core\DataHandling\DataHandler\getCheckModifyAccessListHookObjects(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordIconAltText(), TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages(), and TYPO3\CMS\Core\Database\RelationHandler\writeForeignField().