RecordState
A RecordState is an abstract description of a record that consists of
- an EntityContext describing the "variant" of a record
- an EntityPointer that describes the node where the record is stored
- an EntityUidPointer of the record the RecordState instance represents
Instances of this class are created by the RecordStateFactory.
Table of Contents
Properties
- $context : EntityContext
- $languageLink : EntityPointerLink|null
- $node : EntityPointer
- $subject : EntityUidPointer
- $versionLink : EntityPointerLink|null
Methods
- __construct() : mixed
- getContext() : EntityContext
- getLanguageLink() : EntityPointerLink
- getNode() : EntityPointer
- getSubject() : EntityUidPointer
- getVersionLink() : EntityPointerLink
- isNew() : bool
- resolveNodeAggregateIdentifier() : string
- 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.
- resolveNodeIdentifier() : string
- 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.
- withLanguageLink() : static
- withVersionLink() : static
Properties
$context
protected
EntityContext
$context
$languageLink
protected
EntityPointerLink|null
$languageLink
$node
protected
EntityPointer
$node
$subject
protected
EntityUidPointer
$subject
$versionLink
protected
EntityPointerLink|null
$versionLink
Methods
__construct()
public
__construct(EntityContext $context, EntityPointer $node, EntityUidPointer $subject) : mixed
Parameters
- $context : EntityContext
- $node : EntityPointer
- $subject : EntityUidPointer
getContext()
public
getContext() : EntityContext
Return values
EntityContextgetLanguageLink()
public
getLanguageLink() : EntityPointerLink
Return values
EntityPointerLinkgetNode()
public
getNode() : EntityPointer
Return values
EntityPointergetSubject()
public
getSubject() : EntityUidPointer
Return values
EntityUidPointergetVersionLink()
public
getVersionLink() : EntityPointerLink
Return values
EntityPointerLinkisNew()
public
isNew() : bool
Return values
boolresolveNodeAggregateIdentifier()
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.
public
resolveNodeAggregateIdentifier() : string
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
Return values
stringresolveNodeIdentifier()
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.
public
resolveNodeIdentifier() : string
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
Return values
stringwithLanguageLink()
public
withLanguageLink(EntityPointerLink|null $languageLink) : static
Parameters
- $languageLink : EntityPointerLink|null
Return values
staticwithVersionLink()
public
withVersionLink(EntityPointerLink|null $versionLink) : static
Parameters
- $versionLink : EntityPointerLink|null