‪TYPO3CMS  ‪main
TYPO3\CMS\Core\DataHandling\Model\RecordState Class Reference

Public Member Functions

 __construct (EntityContext $context, EntityPointer $node, EntityUidPointer $subject)
 
 getContext ()
 
 getNode ()
 
 getSubject ()
 
EntityPointerLink getLanguageLink ()
 
EntityPointerLink getVersionLink ()
 
 isNew ()
 
 resolveNodeIdentifier ()
 
 resolveNodeAggregateIdentifier ()
 

Static Public Member Functions

static withLanguageLink (?EntityPointerLink $languageLink)
 
static withVersionLink (?EntityPointerLink $versionLink)
 

Protected Attributes

EntityContext $context
 
EntityPointer $node
 
EntityUidPointer $subject
 
EntityPointerLink null $languageLink
 
EntityPointerLink null $versionLink
 

Detailed Description

A RecordState is an abstract description of a record that consists of

Instances of this class are created by the RecordStateFactory.

Definition at line 31 of file RecordState.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\DataHandling\Model\RecordState::__construct ( EntityContext  $context,
EntityPointer  $node,
EntityUidPointer  $subject 
)

Member Function Documentation

◆ getContext()

◆ getLanguageLink()

EntityPointerLink TYPO3\CMS\Core\DataHandling\Model\RecordState::getLanguageLink ( )

◆ getNode()

TYPO3\CMS\Core\DataHandling\Model\RecordState::getNode ( )

◆ getSubject()

◆ getVersionLink()

EntityPointerLink TYPO3\CMS\Core\DataHandling\Model\RecordState::getVersionLink ( )

◆ isNew()

TYPO3\CMS\Core\DataHandling\Model\RecordState::isNew ( )

◆ resolveNodeAggregateIdentifier()

TYPO3\CMS\Core\DataHandling\Model\RecordState::resolveNodeAggregateIdentifier ( )

Resolves node identifier used as aggregate for current subject. For translated pages that would result in the uid of the outer-most language parent page, for pages it's the identifier of the current subject, otherwise it's the pid of the current subject.

Example:

  • ‪pages: uid: 10, pid: 5, sys_language_uid: 0, l10n_parent: 0 -> returns 10
  • ‪pages: uid: 11, pid: 5, sys_language_uid: 1, l10n_parent: 10 -> returns 10
  • ‪pages in version, return online page ID
  • ‪other: uid: 12, pid: 10 -> returns 10

Definition at line 157 of file RecordState.php.

Referenced by TYPO3\CMS\Core\DataHandling\SlugHelper\isUniqueInSite().

◆ resolveNodeIdentifier()

TYPO3\CMS\Core\DataHandling\Model\RecordState::resolveNodeIdentifier ( )

Resolves node identifier (pid) of current subject. For translated pages that would result in the uid of the outer-most language parent page otherwise it's the pid of the current subject.

Example:

  • ‪pages: uid: 10, pid: 5, sys_language_uid: 0, l10n_parent: 0 -> returns 5
  • ‪pages: uid: 11, pid: 5, sys_language_uid: 1, l10n_parent: 10 -> returns 10
  • ‪other: uid: 12, pid: 10 -> returns 10

Definition at line 134 of file RecordState.php.

Referenced by TYPO3\CMS\Core\DataHandling\SlugHelper\isUniqueInPid().

◆ withLanguageLink()

static TYPO3\CMS\Core\DataHandling\Model\RecordState::withLanguageLink ( ?EntityPointerLink  $languageLink)
static
Returns
‪static

Definition at line 86 of file RecordState.php.

References TYPO3\CMS\Core\DataHandling\Model\RecordState\$languageLink.

◆ withVersionLink()

static TYPO3\CMS\Core\DataHandling\Model\RecordState::withVersionLink ( ?EntityPointerLink  $versionLink)
static
Returns
‪static

Definition at line 107 of file RecordState.php.

References TYPO3\CMS\Core\DataHandling\Model\RecordState\$versionLink.

Member Data Documentation

◆ $context

EntityContext TYPO3\CMS\Core\DataHandling\Model\RecordState::$context
protected

◆ $languageLink

EntityPointerLink null TYPO3\CMS\Core\DataHandling\Model\RecordState::$languageLink
protected

◆ $node

EntityPointer TYPO3\CMS\Core\DataHandling\Model\RecordState::$node
protected

◆ $subject

EntityUidPointer TYPO3\CMS\Core\DataHandling\Model\RecordState::$subject
protected

◆ $versionLink

EntityPointerLink null TYPO3\CMS\Core\DataHandling\Model\RecordState::$versionLink
protected