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

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

EntityContext $context
 
EntityPointer $node
 
EntityUidPointer $subject
 
EntityPointerLink $languageLink
 
EntityPointerLink $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()

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

◆ getSubject()

◆ getVersionLink()

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

◆ isNew()

bool TYPO3\CMS\Core\DataHandling\Model\RecordState::isNew ( )
Returns
‪bool

Definition at line 136 of file RecordState.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

◆ resolveNodeAggregateIdentifier()

string 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
Returns
‪string

Definition at line 180 of file RecordState.php.

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

◆ resolveNodeIdentifier()

string 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
Returns
‪string

Definition at line 155 of file RecordState.php.

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

◆ withLanguageLink()

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

Definition at line 101 of file RecordState.php.

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

◆ withVersionLink()

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

Definition at line 123 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 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 TYPO3\CMS\Core\DataHandling\Model\RecordState::$versionLink
protected