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

Methods

isNew()

public isNew() : bool
Return values
bool

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.

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
string

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.

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
string

        
On this page

Search results