PHP Class Neos\ContentRepository\Domain\Factory\NodeFactory

Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$nodes array<\Neos\ContentRepository\Domain\Model\Node>
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$securityContext Neos\Flow\Security\Context

Méthodes publiques

Méthode Description
createContextMatchingNodeData ( NodeData $nodeData ) : Context Generates a Context that exactly fits the given NodeData Workspace and Dimensions.
createFromNodeData ( NodeData $nodeData, Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface Creates a node from the given NodeData container.
getNodeInterfaceImplementations ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array Get all NodeInterface implementations to check if a configured node class is in there.
reset ( ) : void Reset the node instances (for testing)

Méthodes protégées

Méthode Description
filterNodeByContext ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface | null Filter a node by the current context.

Method Details

createContextMatchingNodeData() public méthode

TODO: We could get more specific about removed and invisible content by adding some more logic here that generates fitting values.
public createContextMatchingNodeData ( NodeData $nodeData ) : Context
$nodeData Neos\ContentRepository\Domain\Model\NodeData
Résultat Neos\ContentRepository\Domain\Service\Context

createFromNodeData() public méthode

If this factory has previously created a Node for the given $node and it's dimensions, it will return the same node again.
public createFromNodeData ( NodeData $nodeData, Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface
$nodeData Neos\ContentRepository\Domain\Model\NodeData
$context Neos\ContentRepository\Domain\Service\Context
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

filterNodeByContext() protected méthode

Will either return the node or NULL if it is not permitted in current context.
protected filterNodeByContext ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface | null
$node Neos\ContentRepository\Domain\Model\NodeInterface
$context Neos\ContentRepository\Domain\Service\Context
Résultat Neos\ContentRepository\Domain\Model\NodeInterface | null

getNodeInterfaceImplementations() public static méthode

Get all NodeInterface implementations to check if a configured node class is in there.
public static getNodeInterfaceImplementations ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Résultat array

reset() public méthode

Reset the node instances (for testing)
public reset ( ) : void
Résultat void

Property Details

$contextFactory protected_oe property

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
Résultat Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$nodes protected_oe property

protected array<\Neos\ContentRepository\Domain\Model\Node> $nodes
Résultat array<\Neos\ContentRepository\Domain\Model\Node>

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
Résultat Neos\Flow\Security\Context