PHP Class Neos\ContentRepository\Domain\Model\AbstractNodeData

NOTE: This class is not supposed to be subclassed by userland code. If this API is modified, make sure to also implement the additional methods inside NodeData, NodeTemplate and Node and keep NodeInterface in sync!
Exibir arquivo Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$accessRoles array List of role names which are required to access this node at all
$contentObjectProxy ContentObjectProxy An optional object which is used as a content container alternative to $properties
$creationDateTime DateTimeInterface
$hidden boolean If this node is hidden, it is not shown in a public place
$hiddenAfterDateTime DateTimeInterface If set, this node is automatically hidden after the specified date / time
$hiddenBeforeDateTime DateTimeInterface If set, this node is automatically hidden before the specified date / time
$hiddenInIndex boolean If this node should be hidden in indexes, such as a website navigation
$lastModificationDateTime DateTimeInterface
$lastPublicationDateTime DateTimeInterface
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeType string The name of the node type of this node
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$properties array Properties of this Node

Public Methods

Method Description
__construct ( ) Constructs this node data container
getAccessRoles ( ) : array Returns the names of defined access roles
getContentObject ( ) : object Returns the content object of this node (if any).
getCreationDateTime ( ) : DateTime
getHiddenAfterDateTime ( ) : DateTime Returns the date and time after which this node will be automatically hidden.
getHiddenBeforeDateTime ( ) : DateTime Returns the date and time before which this node will be automatically hidden.
getLastModificationDateTime ( ) : DateTime
getLastPublicationDateTime ( ) : DateTime
getNodeType ( ) : NodeType Returns the node type of this node.
getProperties ( ) : array Returns all properties of this node.
getProperty ( string $propertyName ) : mixed Returns the specified property.
getPropertyNames ( ) : array Returns the names of all properties of this node.
getWorkspace ( ) : Workspace Returns the workspace this node is contained in
hasProperty ( string $propertyName ) : boolean If this node has a property with the given name.
isHidden ( ) : boolean Returns the current state of the hidden flag
isHiddenInIndex ( ) : boolean If this node should be hidden in indexes
removeProperty ( string $propertyName ) : void Removes the specified property.
setAccessRoles ( array $accessRoles ) : void Sets the roles which are required to access this node
setContentObject ( object $contentObject ) : void Sets a content object for this node.
setHidden ( boolean $hidden ) : void Sets the "hidden" flag for this node.
setHiddenAfterDateTime ( DateTimeInterface $dateTime = null ) : void Sets the date and time when this node should be automatically hidden
setHiddenBeforeDateTime ( DateTimeInterface $dateTime = null ) : void Sets the date and time when this node becomes potentially visible.
setHiddenInIndex ( boolean $hidden ) : void Sets if this node should be hidden in indexes, such as a site navigation.
setLastPublicationDateTime ( DateTimeInterface $lastPublicationDateTime = null ) : void
setNodeType ( NodeType $nodeType ) : void Sets the node type of this node.
setProperty ( string $propertyName, mixed $value ) : void Sets the specified property.
unsetContentObject ( ) : void Unsets the content object of this node.

Protected Methods

Method Description
addOrUpdate ( ) : void By default this method does not do anything.
persistRelatedEntities ( mixed $value ) Checks if a property value contains an entity and persists it.
updateContentObject ( object $contentObject ) : void By default this method does not do anything.

Method Details

__construct() public method

Constructs this node data container
public __construct ( )

addOrUpdate() protected method

For persisted nodes (PersistedNodeInterface) this updates the node in the node repository, for new nodes this method will add the respective node to the repository.
protected addOrUpdate ( ) : void
return void

getAccessRoles() public method

Returns the names of defined access roles
public getAccessRoles ( ) : array
return array

getContentObject() public method

Returns the content object of this node (if any).
public getContentObject ( ) : object
return object The content object or NULL if none was set

getCreationDateTime() public method

public getCreationDateTime ( ) : DateTime
return DateTime

getHiddenAfterDateTime() public method

Returns the date and time after which this node will be automatically hidden.
public getHiddenAfterDateTime ( ) : DateTime
return DateTime Date after which this node will be hidden

getHiddenBeforeDateTime() public method

Returns the date and time before which this node will be automatically hidden.
public getHiddenBeforeDateTime ( ) : DateTime
return DateTime Date before this node will be hidden or NULL if no such time was set

getLastModificationDateTime() public method

public getLastModificationDateTime ( ) : DateTime
return DateTime

getLastPublicationDateTime() public method

public getLastPublicationDateTime ( ) : DateTime
return DateTime

getNodeType() public method

Returns the node type of this node.
public getNodeType ( ) : NodeType
return NodeType

getProperties() public method

If the node has a content object attached, the properties will be fetched there.
public getProperties ( ) : array
return array Property values, indexed by their name

getProperty() public method

If the node has a content object attached, the property will be fetched there if it is gettable.
public getProperty ( string $propertyName ) : mixed
$propertyName string Name of the property
return mixed value of the property

getPropertyNames() public method

Returns the names of all properties of this node.
public getPropertyNames ( ) : array
return array Property names

getWorkspace() abstract public method

Returns the workspace this node is contained in
abstract public getWorkspace ( ) : Workspace
return Workspace

hasProperty() public method

If the node has a content object attached, the property will be checked there.
public hasProperty ( string $propertyName ) : boolean
$propertyName string Name of the property to test for
return boolean

isHidden() public method

Returns the current state of the hidden flag
public isHidden ( ) : boolean
return boolean

isHiddenInIndex() public method

If this node should be hidden in indexes
public isHiddenInIndex ( ) : boolean
return boolean

persistRelatedEntities() protected method

Checks if a property value contains an entity and persists it.
protected persistRelatedEntities ( mixed $value )
$value mixed

removeProperty() public method

If the node has a content object attached, the property will not be removed on that object if it exists.
public removeProperty ( string $propertyName ) : void
$propertyName string Name of the property
return void

setAccessRoles() public method

Sets the roles which are required to access this node
public setAccessRoles ( array $accessRoles ) : void
$accessRoles array
return void

setContentObject() public method

Sets a content object for this node.
public setContentObject ( object $contentObject ) : void
$contentObject object The content object
return void

setHidden() public method

Sets the "hidden" flag for this node.
public setHidden ( boolean $hidden ) : void
$hidden boolean If TRUE, this Node will be hidden
return void

setHiddenAfterDateTime() public method

Sets the date and time when this node should be automatically hidden
public setHiddenAfterDateTime ( DateTimeInterface $dateTime = null ) : void
$dateTime DateTimeInterface Date after which this node should be hidden or NULL if no such time was set
return void

setHiddenBeforeDateTime() public method

Sets the date and time when this node becomes potentially visible.
public setHiddenBeforeDateTime ( DateTimeInterface $dateTime = null ) : void
$dateTime DateTimeInterface Date before this node should be hidden
return void

setHiddenInIndex() public method

Sets if this node should be hidden in indexes, such as a site navigation.
public setHiddenInIndex ( boolean $hidden ) : void
$hidden boolean TRUE if it should be hidden, otherwise FALSE
return void

setLastPublicationDateTime() public method

public setLastPublicationDateTime ( DateTimeInterface $lastPublicationDateTime = null ) : void
$lastPublicationDateTime DateTimeInterface
return void

setNodeType() public method

Sets the node type of this node.
public setNodeType ( NodeType $nodeType ) : void
$nodeType NodeType
return void

setProperty() public method

If the node has a content object attached, the property will be set there if it is settable.
public setProperty ( string $propertyName, mixed $value ) : void
$propertyName string Name of the property
$value mixed Value of the property
return void

unsetContentObject() public method

Unsets the content object of this node.
public unsetContentObject ( ) : void
return void

updateContentObject() protected method

For persisted nodes (PersistedNodeInterface) this updates the content object via the PersistenceManager
protected updateContentObject ( object $contentObject ) : void
$contentObject object
return void

Property Details

$accessRoles protected_oe property

List of role names which are required to access this node at all
protected array $accessRoles
return array

$contentObjectProxy protected_oe property

An optional object which is used as a content container alternative to $properties
protected ContentObjectProxy,Neos\ContentRepository\Domain\Model $contentObjectProxy
return ContentObjectProxy

$creationDateTime protected_oe property

protected DateTimeInterface $creationDateTime
return DateTimeInterface

$hidden protected_oe property

If this node is hidden, it is not shown in a public place
protected bool $hidden
return boolean

$hiddenAfterDateTime protected_oe property

If set, this node is automatically hidden after the specified date / time
protected DateTimeInterface $hiddenAfterDateTime
return DateTimeInterface

$hiddenBeforeDateTime protected_oe property

If set, this node is automatically hidden before the specified date / time
protected DateTimeInterface $hiddenBeforeDateTime
return DateTimeInterface

$hiddenInIndex protected_oe property

If this node should be hidden in indexes, such as a website navigation
protected bool $hiddenInIndex
return boolean

$lastModificationDateTime protected_oe property

protected DateTimeInterface $lastModificationDateTime
return DateTimeInterface

$lastPublicationDateTime protected_oe property

protected DateTimeInterface $lastPublicationDateTime
return DateTimeInterface

$nodeDataRepository protected_oe property

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
return Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeType protected_oe property

The name of the node type of this node
protected string $nodeType
return string

$nodeTypeManager protected_oe property

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
return Neos\ContentRepository\Domain\Service\NodeTypeManager

$persistenceManager protected_oe property

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

$properties protected_oe property

Properties of this Node
protected array $properties
return array