TYPO3  7.6
Public Member Functions | Public Attributes | List of all members
VersionState Class Reference
Inheritance diagram for VersionState:
Enumeration TypeInterface

Public Member Functions

 indicatesPlaceholder ()
 
- Public Member Functions inherited from 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 Enumeration
static getConstants ($include_default=false)
 
static cast ($value)
 
- Protected Member Functions inherited from Enumeration
 setValue ($value)
 
 isValid ($value)
 
- Static Protected Member Functions inherited from Enumeration
static loadValues ()
 
- Protected Attributes inherited from Enumeration
 $value
 
- Static Protected Attributes inherited from Enumeration
static $enumConstants
 

Detailed Description

Enumeration object for VersionState

Definition at line 20 of file VersionState.php.

Member Function Documentation

indicatesPlaceholder ( )
Returns
bool

Definition at line 75 of file VersionState.php.

References Enumeration\__toString().

Member Data Documentation

const __default = self::DEFAULT_STATE

Definition at line 22 of file VersionState.php.

const DEFAULT_STATE = 0

The t3ver_state 0 is used for the live version of a record and for draft records with pid -1

Definition at line 36 of file VersionState.php.

Referenced by PageRepository\enableFields(), WorkspaceService\getMoveToPlaceHolderFromPages(), DataHandlerHook\processCmdmap_deleteAction(), and DataHandler\versionizeRecord().

const DELETE_PLACEHOLDER = 2
const 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 IconUtility\getIcon(), PageRepository\getMovePlaceholder(), WorkspaceService\getMoveToPlaceHolderFromPages(), VersionsCommand\main(), PageRepository\movePlhOL(), DataHandlerHook\moveRecord(), DataHandlerHook\moveRecord_wsPlaceholders(), DataHandlerHook\processCmdmap_deleteAction(), PlainDataResolver\processVersionMovePlaceholders(), and DataHandler\versionizeRecord().

const MOVE_POINTER = 4
const NEW_PLACEHOLDER = 1

Creating elements is done by first creating a placeholder element which is in fact live but carrying a flag (t3ver_state=1) that makes it invisible online.

Definition at line 44 of file VersionState.php.

Referenced by IntegrityService\checkLocalization(), IconUtility\getIcon(), WorkspaceService\isNewPage(), VersionsCommand\main(), and DataHandlerHook\version_clearWSID().

const 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 RelationHandler\writeForeignField().