PHP Class Neos\Neos\EventLog\Domain\Model\NodeEvent

Inheritance: extends Event
Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$dimension array the dimension values for that event
$documentNodeIdentifier string the document node identifier on which the action took place. is equal to NodeIdentifier if the action happened on documentNodes
$nodeIdentifier string ..
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$userService Neos\Neos\Service\UserService
$workspaceName string the workspace name where the action took place

Public Methods

Method Description
__toString ( ) : string
getClosestAggregateNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the closest aggregate node of the given node
getDocumentNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the closest document node, if it can be resolved.
getDocumentNodeIdentifier ( ) : string Return the node identifier of the closest parent document node related to this event
getNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the node this even refers to, if it can be resolved.
getNodeIdentifier ( ) : string Return the node identifier of the node this event relates to
getWorkspaceName ( ) : string Return name of the workspace where the node event happened
isDocumentEvent ( )
setNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Set the "context node" this operation was working on.
setWorkspaceName ( string $workspaceName ) : void Override the workspace name. *MUST* be called after setNode(), else it won't have an effect.

Protected Methods

Method Description
getCurrentSite ( ) : null | object Prevents invalid calls to the site respository in case the site data property is not available.

Method Details

__toString() public method

public __toString ( ) : string
return string

getClosestAggregateNode() public static method

Returns the closest aggregate node of the given node
public static getClosestAggregateNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : Neos\ContentRepository\Domain\Model\NodeInterface
$node Neos\ContentRepository\Domain\Model\NodeInterface
return Neos\ContentRepository\Domain\Model\NodeInterface

getCurrentSite() protected method

Prevents invalid calls to the site respository in case the site data property is not available.
protected getCurrentSite ( ) : null | object
return null | object

getDocumentNode() public method

It might happen that, if this event refers to a node contained in a site which is not available anymore, Doctrine's proxy class of the Site domain model will fail with an EntityNotFoundException. We catch this case and return NULL.
public getDocumentNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
return Neos\ContentRepository\Domain\Model\NodeInterface

getDocumentNodeIdentifier() public method

Return the node identifier of the closest parent document node related to this event

getNode() public method

It might happen that, if this event refers to a node contained in a site which is not available anymore, Doctrine's proxy class of the Site domain model will fail with an EntityNotFoundException. We catch this case and return NULL.
public getNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
return Neos\ContentRepository\Domain\Model\NodeInterface

getNodeIdentifier() public method

Return the node identifier of the node this event relates to
public getNodeIdentifier ( ) : string
return string

getWorkspaceName() public method

Return name of the workspace where the node event happened
public getWorkspaceName ( ) : string
return string

isDocumentEvent() public method

public isDocumentEvent ( )

setNode() public method

Set the "context node" this operation was working on.
public setNode ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void

setWorkspaceName() public method

Override the workspace name. *MUST* be called after setNode(), else it won't have an effect.
public setWorkspaceName ( string $workspaceName ) : void
$workspaceName string
return void

Property Details

$contextFactory protected property

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
return Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$dimension protected property

the dimension values for that event
protected array $dimension
return array

$documentNodeIdentifier protected property

the document node identifier on which the action took place. is equal to NodeIdentifier if the action happened on documentNodes
protected string $documentNodeIdentifier
return string

$nodeIdentifier protected property

..
protected string $nodeIdentifier
return string

$persistenceManager protected property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$siteRepository protected property

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
return Neos\Neos\Domain\Repository\SiteRepository

$userService protected property

protected UserService,Neos\Neos\Service $userService
return Neos\Neos\Service\UserService

$workspaceName protected property

the workspace name where the action took place
protected string $workspaceName
return string