NodeEvent
class NodeEvent extends Event (View source)
A specific event which is used for ContentRepository Nodes (i.e. content).
Properties
protected DateTime | $timestamp | When was this event? |
from Event |
protected int | $uid | We introduce an auto_increment column to be able to sort events at the same timestamp |
from Event |
protected string | $eventType | What was this event about? Is a required string constant. |
from Event |
protected string | $accountIdentifier | The identifier of the account that triggered this event. Optional. |
from Event |
protected array | $data | Payload of the event. |
from Event |
protected Event | $parentEvent | The parent event, if exists. E.g. if a "move node" operation triggered a bunch of other events, or a "publish" |
from Event |
protected Event> | $childEvents | Child events, of this event |
from Event |
protected string | $nodeIdentifier | the node identifier which was created/modified/. |
|
protected string | $documentNodeIdentifier | the document node identifier on which the action took place. |
|
protected string | $workspaceName | the workspace name where the action took place |
|
protected array | $dimension | the dimension values for that event |
|
protected UserService | $userService | ||
protected PersistenceManagerInterface | $persistenceManager | ||
protected SiteRepository | $siteRepository |
Methods
Create a new event
Return the identifier of the account (if any) which triggered this event
Add a new child event. Is called from the child event's constructor.
Return name of the workspace where the node event happened
No description
Return the node identifier of the closest parent document node related to this event
Return the node identifier of the node this event relates to
Override the workspace name. MUST be called after setNode(), else it won't have an effect.
Prevents invalid calls to the site repository in case the site data property is not available.
No description
Details
in
Event at line 109
__construct(string $eventType, array $data, string $user = null, Event $parentEvent = null)
Create a new event
in
Event at line 127
string
getEventType()
Return the type of this event
in
Event at line 137
DateTime
getTimestamp()
Return the timestamp of this event
in
Event at line 147
array
getData()
Return the payload of this event
in
Event at line 157
?string
getAccountIdentifier()
Return the identifier of the account (if any) which triggered this event
in
Event at line 165
Event|null
getParentEvent()
Return the parent event (if any)
in
Event at line 175
ArrayCollection
getChildEvents()
Return the child events (if any)
in
Event at line 186
void
addChildEvent(Event $childEvent)
Add a new child event. Is called from the child event's constructor.
string
getWorkspaceName()
Return name of the workspace where the node event happened
bool
isDocumentEvent()
No description
string
getDocumentNodeIdentifier()
Return the node identifier of the closest parent document node related to this event
string
getNodeIdentifier()
Return the node identifier of the node this event relates to
void
setWorkspaceName(string $workspaceName)
Override the workspace name. MUST be called after setNode(), else it won't have an effect.
protected null|object
getCurrentSite()
Prevents invalid calls to the site repository in case the site data property is not available.
string
__toString()
No description