‪TYPO3CMS  ‪main
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

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

Public Attributes

const __default = self::DEFAULT_STATE
 
const DEFAULT_STATE = 0
 
const NEW_PLACEHOLDER = 1
 
const DELETE_PLACEHOLDER = 2
 
const MOVE_POINTER = 4
 

Additional Inherited Members

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

Detailed Description

Enumeration object for VersionState

Definition at line 23 of file VersionState.php.

Member Function Documentation

◆ indicatesPlaceholder()

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

Member Data Documentation

◆ __default

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

Definition at line 25 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 publishing the versions.

Definition at line 49 of file VersionState.php.

Referenced by TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseEditRow\addData(), TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\addItemsFromForeignTable(), TYPO3\CMS\Workspaces\Controller\ReviewController\addPreviewLink(), TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction\buildExpression(), TYPO3\CMS\Core\DataHandling\DataHandler\copyL10nOverlayRecords(), TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createClearDependentElementChildReferenceCallback(), TYPO3\CMS\Workspaces\Dependency\ElementEntityProcessor\createClearDependentElementParentReferenceCallback(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteL10nOverlayRecords(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\fetchFilteredTree(), TYPO3\CMS\Backend\View\BackendLayout\Grid\LanguageColumn\getAllowViewPage(), TYPO3\CMS\Backend\Controller\Page\LocalizationController\getRecordLocalizeSummary(), TYPO3\CMS\Backend\View\BackendLayout\ContentFetcher\getResult(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaFiles\getSubstitutedWorkspacedUids(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isDeletePlaceholder(), TYPO3\CMS\Backend\RecordList\DatabaseRecordList\isRecordDeletePlaceholder(), TYPO3\CMS\Backend\Controller\EditDocumentController\languageSwitch(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeViewButton(), TYPO3\CMS\Core\Imaging\IconFactory\mapRecordTypeToOverlayIdentifier(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_moveVersionedRecord(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\processVersionOverlays(), TYPO3\CMS\Core\Database\RelationHandler\purgeDeletePlaceholder(), TYPO3\CMS\Core\DataHandling\SlugHelper\resolveVersionOverlays(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord(), TYPO3\CMS\Core\Domain\Repository\PageRepository\versionOL(), and TYPO3\CMS\Workspaces\Service\GridDataService\workspaceState().

◆ MOVE_POINTER

const TYPO3\CMS\Core\Versioning\VersionState::MOVE_POINTER = 4

When an element is moved to a different page, a versioned record is created with t3ver_state=4 and the new PID. When the database table has a sorting field, the sorting on the versioned record is also updated to reflect the new position.

When reading records from the DB with workspaces in mind, the t3ver_state=4 records should be fetched as well to find the new position and to do "workspace overlays" properly.

Definition at line 61 of file VersionState.php.

Referenced by TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction\buildExpression(), TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider\buildForeignTableQueryBuilder(), TYPO3\CMS\Core\DataHandling\DataHandler\copySpecificPage(), TYPO3\CMS\Core\Domain\Repository\PageRepository\enableFields(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\fetchAllPages(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\fetchFilteredTree(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\fetchTranslationValues(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getMovedRecordsFromPages(), TYPO3\CMS\Backend\Tree\Repository\PageTreeRepository\getPageRecords(), TYPO3\CMS\Core\Domain\Repository\PageRepository\getRecordOverlay(), TYPO3\CMS\Core\DataHandling\DataHandler\getSortNumber(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getTreeUids(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord_moveVersionedRecord(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\processVersionMovePlaceholders(), TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend\resolveMovedRecordsInWorkspace(), TYPO3\CMS\Core\Utility\RootlineUtility\resolveMovePointerId(), TYPO3\CMS\Core\Utility\RootlineUtility\resolvePageId(), TYPO3\CMS\Workspaces\Service\WorkspaceService\selectAllVersionsFromPages(), TYPO3\CMS\Install\Updates\RowUpdater\WorkspaceMovePlaceholderRemovalMigration\updateTableRow(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), TYPO3\CMS\Core\Domain\Repository\PageRepository\versionOL(), and TYPO3\CMS\Workspaces\Service\GridDataService\workspaceState().

◆ NEW_PLACEHOLDER

const TYPO3\CMS\Core\Versioning\VersionState::NEW_PLACEHOLDER = 1

If a new record is created in a workspace a new record is added with t3ver_state = 1, a so-called "newly versioned record", which acts as a standalone record and has no t3ver_oid value. Publishing this record is done by changing the t3ver_wsid field to "0".

Definition at line 41 of file VersionState.php.

Referenced by TYPO3\CMS\Workspaces\EventListener\PageTreeItemsHighlighter\__invoke(), TYPO3\CMS\Workspaces\Service\IntegrityService\checkLocalization(), TYPO3\CMS\Core\DataHandling\DataHandler\discard(), TYPO3\CMS\Core\DataHandling\DataHandler\discardLocalizedWorkspaceVersionsOfRecord(), TYPO3\CMS\Core\DataHandling\DataHandler\discardSubPagesAndRecordsOnPage(), TYPO3\CMS\Workspaces\Service\WorkspaceService\fetchPagesWithVersionsInTable(), TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor\fetchTranslationValues(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\flushWorkspaceElements(), TYPO3\CMS\Workspaces\Service\GridDataService\generateDataArray(), TYPO3\CMS\Workspaces\Service\WorkspaceService\getNewVersionsForPages(), TYPO3\CMS\Backend\Controller\EditDocumentController\getRecordForEdit(), TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer\getRowDetails(), TYPO3\CMS\Core\Domain\Repository\PageRepository\getWorkspaceVersionOfRecord(), TYPO3\CMS\Core\Tests\Functional\Domain\Repository\PageRepositoryTest\getWorkspaceVersionReturnsTheCorrectMethod(), TYPO3\CMS\Core\Versioning\VersionState\indicatesPlaceholder(), TYPO3\CMS\Workspaces\Service\WorkspaceService\isNewPage(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Core\Tests\Functional\Domain\Repository\PageRepositoryTest\previewShowsPagesFromLiveAndCurrentWorkspace(), TYPO3\CMS\Core\DataHandling\DataHandler\process_datamap(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Workspaces\Hook\DataHandlerHook\version_swap(), TYPO3\CMS\Core\Domain\Repository\PageRepository\versionOL(), TYPO3\CMS\Core\DataHandling\DataHandler\workspaceCannotEditOfflineVersion(), TYPO3\CMS\Core\DataHandling\DataHandler\workspaceCannotEditRecord(), and TYPO3\CMS\Workspaces\Service\GridDataService\workspaceState().