PHP Класс Neos\ContentRepository\Domain\Repository\NodeDataRepository

DO NOT USE outside the ContentRepository package! The ContextFactory can be used to create a Context that allows to find Node instances that act as the public API to the ContentRepository.
Наследование: extends Neos\Flow\Persistence\Repository
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$addedNodes SplObjectStorage
$defaultOrderings array
$entityManager Doctrine\Common\Persistence\ObjectManager ..
$highestIndexCache array
$nodeFactory Neos\ContentRepository\Domain\Factory\NodeFactory
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$removedNodes SplObjectStorage
$securityContext Neos\Flow\Security\Context
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Открытые методы

Метод Описание
__construct ( ) Constructor
add ( object $object ) : void Adds a NodeData object to this repository.
addNodeTypeFilterConstraintsToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $nodeTypeFilter ) : void Add node type filter constraints to the query builder
countByParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean $includeRemovedNodes = false ) : integer Counts nodes by its parent and (optionally) by its node type.
countByWorkspace ( Workspace $workspace ) : integer Counts the number of nodes within the specified workspace
findByIdentifierWithoutReduce ( string $identifier, Workspace $workspace ) : array<\Neos\ContentRepository\Domain\Model\NodeData> Find NodeData by identifier path without any dimension reduction
findByParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean $removedNodes = false, boolean $recursive = false ) : array<\Neos\ContentRepository\Domain\Model\NodeData> Finds nodes by its parent and (optionally) by its node type.
findByParentAndNodeTypeInContext ( string $parentPath, string $nodeTypeFilter, Context $context, boolean $recursive = false ) : array<\Neos\ContentRepository\Domain\Model\NodeInterface> Finds nodes by its parent and (optionally) by its node type given a Context
findByParentAndNodeTypeRecursively ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean $removedNodes = false ) : array<\Neos\ContentRepository\Domain\Model\NodeData> Finds recursively nodes by its parent and (optionally) by its node type.
findByParentWithoutReduce ( string $parentPath, Workspace $workspace ) : array<\Neos\ContentRepository\Domain\Model\NodeData> Find NodeData by parent path without any dimension reduction and grouping by identifier
findByPathWithoutReduce ( string $path, Workspace $workspace, boolean $includeRemovedNodes = false, boolean $recursive = false ) : array Find all node data in a path matching the given workspace hierarchy
findByProperties ( string | array $term, string $nodeTypeFilter, Workspace $workspace, array $dimensions, string $pathStartingPoint = null ) : array<\Neos\ContentRepository\Domain\Model\NodeData> Find nodes by a value in properties
findByWorkspace ( Workspace $workspace ) : array Find all NodeData objects inside a given workspace sorted by path to be used in publishing. The order makes sure that parent nodes are published first.
findFirstByParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions, boolean $removedNodes = false ) : NodeData Finds a single node by its parent and (optionally) by its node type
findFirstByParentAndNodeTypeInContext ( string $parentPath, string $nodeTypeFilter, Context $context ) : NodeData Finds a single node by its parent and (optionally) by its node type
findNodesByRelatedEntities ( array $relationMap ) : array Searches for possible relations to the given entity identifiers in NodeData.
findOnPath ( string $pathStartingPoint, string $pathEndPoint, Workspace $workspace, array $dimensions = null, boolean $includeRemovedNodes = false, string $nodeTypeFilter = null ) : array<\Neos\ContentRepository\Domain\Model\NodeData> Finds all nodes of the specified workspace lying on the path specified by (and including) the given starting point and end point and (optionally) a node type filter.
findOneByIdentifier ( string $identifier, Workspace $workspace, array $dimensions = null ) : NodeData Finds a node by its identifier and workspace.
findOneByPath ( string $path, Workspace $workspace, array $dimensions = null, boolean | null $removedNodes = false ) : NodeData Find a single node by exact path.
findOneByPathInContext ( string $path, Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface | null Finds a node by its path and context.
findShadowNodeByPath ( string $path, Workspace $workspace, array $dimensions = null ) : NodeData | null Find a shadow node by exact path
flushNodeRegistry ( ) : void Flushes the addedNodes and removedNodes registry.
isInRemovedNodes ( NodeData $nodeData ) : boolean Test if a given NodeData is in the set of removed node data objects
pathExists ( string $nodePath ) : boolean Find out if the given path exists anywhere in the CR. (internal) If you need this functionality use \Neos\ContentRepository\Domain\Service\NodeService::nodePathExistsInAnyContext()
persistEntities ( ) : void Persists all entities managed by the repository and all cascading dependencies
remove ( object $object ) : void Removes an object to the persistence.
removeAllInPath ( string $path ) : void Remove all nodes below a given path. Does not care about workspaces and dimensions.
reset ( ) : void Reset instances (internal).
setNewIndex ( NodeData $node, integer $position, Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode = null ) : void Assigns an index to the given node which reflects the specified position.

Защищенные методы

Метод Описание
addDimensionJoinConstraintsToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, array $dimensions ) : void If $dimensions is not empty, adds join constraints to the given $queryBuilder limiting the query result to matching hits.
addIdentifierConstraintToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $identifier ) : void
addParentPathConstraintToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $parentPath, boolean $recursive = false ) : void
addPathConstraintToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $path, boolean $recursive = false ) : void
collectWorkspaceAndAllBaseWorkspaces ( Workspace $workspace ) : array Returns an array that contains the given workspace and all base (parent) workspaces of it.
createQueryBuilder ( array $workspaces ) : Doctrine\ORM\QueryBuilder
emitRepositoryObjectsPersisted ( ) : void Signals that persistEntities() in this repository finished correctly.
filterNodeDataByBestMatchInContext ( array $nodeDataObjects, Workspace $workspace, array $dimensions, boolean $includeRemovedNodes = false ) : array
filterOutRemovedObjects ( array &$objects ) : void Iterates of the array of objects and removes all those which have recently been removed from the repository, but whose removal has not yet been persisted.
filterRemovedNodes ( array $nodes, boolean | null $removedNodes ) : array Removes NodeData with the removed property set from the given array.
findNextFreeIndexInParentPath ( string $parentPath ) : integer Finds the next free index on the level below the given parent path across all workspaces.
findNextHigherIndex ( string $parentPath, integer $referenceIndex ) : integer Returns the next-higher-index seen from the given reference index in the level below the specified parent path. If no node with a higher than the given index exists at that level, NULL is returned.
findNextLowerIndex ( string $parentPath, integer $referenceIndex ) : integer Returns the next-lower-index seen from the given reference index in the level below the specified parent path. If no node with a lower than the given index exists at that level, the reference index is returned.
findRawNodesByPath ( string $path, Workspace $workspace, array $dimensions = null, boolean $onlyShadowNodes = false ) : array This finds nodes by path and delivers a raw, unfiltered result.
getNodeDataForParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean | null $removedNodes = false, boolean $recursive = false ) : array Internal method
getNodeTypeFilterConstraints ( Neos\Flow\Persistence\QueryInterface $query, $nodeTypeFilter ) : array
getNodeTypeFilterConstraintsForDql ( string $nodeTypeFilter ) : array Generates a two dimensional array with the filters. First level is: 'excludeNodeTypes' 'includeNodeTypes'
openIndexSpace ( string $parentPath, integer $referenceIndex ) Make room in the sortindex-index space of a given path in preparation to inserting a node.
reduceNodeVariantsByWorkspaces ( array $nodes, array $workspaces ) : array Given an array with duplicate nodes (from different workspaces) those are reduced to uniqueness (by node identifier and dimensions hash)
reduceNodeVariantsByWorkspacesAndDimensions ( array $nodes, array $workspaces, array $dimensions ) : array Given an array with duplicate nodes (from different workspaces and dimensions) those are reduced to uniqueness (by node identifier)
setHighestIndexInParentPath ( string $parentPath, integer $highestIndex ) : void
sortNodesByIndex ( array $nodes ) : array Sorts the given nodes by their index

Описание методов

__construct() публичный Метод

Constructor
public __construct ( )

add() публичный Метод

This repository keeps track of added and removed nodes (additionally to the other Unit of Work) in order to find in-memory nodes.
public add ( object $object ) : void
$object object The object to add
Результат void

addDimensionJoinConstraintsToQueryBuilder() защищенный Метод

If $dimensions is not empty, adds join constraints to the given $queryBuilder limiting the query result to matching hits.
protected addDimensionJoinConstraintsToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, array $dimensions ) : void
$queryBuilder Doctrine\ORM\QueryBuilder
$dimensions array
Результат void

addIdentifierConstraintToQueryBuilder() защищенный Метод

protected addIdentifierConstraintToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $identifier ) : void
$queryBuilder Doctrine\ORM\QueryBuilder
$identifier string
Результат void

addNodeTypeFilterConstraintsToQueryBuilder() публичный Метод

Add node type filter constraints to the query builder
public addNodeTypeFilterConstraintsToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $nodeTypeFilter ) : void
$queryBuilder Doctrine\ORM\QueryBuilder
$nodeTypeFilter string
Результат void

addParentPathConstraintToQueryBuilder() защищенный Метод

protected addParentPathConstraintToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $parentPath, boolean $recursive = false ) : void
$queryBuilder Doctrine\ORM\QueryBuilder
$parentPath string
$recursive boolean
Результат void

addPathConstraintToQueryBuilder() защищенный Метод

protected addPathConstraintToQueryBuilder ( Doctrine\ORM\QueryBuilder $queryBuilder, string $path, boolean $recursive = false ) : void
$queryBuilder Doctrine\ORM\QueryBuilder
$path string
$recursive boolean
Результат void

collectWorkspaceAndAllBaseWorkspaces() защищенный Метод

Returns an array that contains the given workspace and all base (parent) workspaces of it.
protected collectWorkspaceAndAllBaseWorkspaces ( Workspace $workspace ) : array
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат array

countByParentAndNodeType() публичный Метод

NOTE: Only considers persisted nodes!
public countByParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean $includeRemovedNodes = false ) : integer
$parentPath string Absolute path of the parent node
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array
$includeRemovedNodes boolean Should removed nodes be included in the result (defaults to FALSE)
Результат integer The number of nodes a similar call to findByParentAndNodeType() would return without any pending added nodes

countByWorkspace() публичный Метод

Note: Also counts removed nodes
public countByWorkspace ( Workspace $workspace ) : integer
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
Результат integer The number of nodes found

createQueryBuilder() защищенный Метод

protected createQueryBuilder ( array $workspaces ) : Doctrine\ORM\QueryBuilder
$workspaces array
Результат Doctrine\ORM\QueryBuilder

emitRepositoryObjectsPersisted() защищенный Метод

Signals that persistEntities() in this repository finished correctly.
protected emitRepositoryObjectsPersisted ( ) : void
Результат void

filterNodeDataByBestMatchInContext() защищенный Метод

protected filterNodeDataByBestMatchInContext ( array $nodeDataObjects, Workspace $workspace, array $dimensions, boolean $includeRemovedNodes = false ) : array
$nodeDataObjects array
$workspace Neos\ContentRepository\Domain\Model\Workspace
$dimensions array
$includeRemovedNodes boolean Should removed nodes be included in the result (defaults to FALSE)
Результат array

filterOutRemovedObjects() защищенный Метод

Technically this is a check of the given array against $this->removedNodes.
protected filterOutRemovedObjects ( array &$objects ) : void
$objects array
Результат void

filterRemovedNodes() защищенный Метод

Removes NodeData with the removed property set from the given array.
protected filterRemovedNodes ( array $nodes, boolean | null $removedNodes ) : array
$nodes array NodeData including removed entries
$removedNodes boolean | null If TRUE the result has ONLY removed nodes. If FALSE removed nodes are NOT inside the result. If NULL the result contains BOTH removed and non-removed nodes.
Результат array NodeData with removed entries removed

findByIdentifierWithoutReduce() публичный Метод

Only used internally for finding whether the node exists in another dimension
public findByIdentifierWithoutReduce ( string $identifier, Workspace $workspace ) : array<\Neos\ContentRepository\Domain\Model\NodeData>
$identifier string
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат array<\Neos\ContentRepository\Domain\Model\NodeData>

findByParentAndNodeType() публичный Метод

If the $recursive flag is set to TRUE, all matching nodes underneath $parentPath will be returned Note: Filters out removed nodes. The primary sort key is the *index*, the secondary sort key (if indices are equal, which only occurs in very rare cases) is the *identifier*.
public findByParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean $removedNodes = false, boolean $recursive = false ) : array<\Neos\ContentRepository\Domain\Model\NodeData>
$parentPath string Absolute path of the parent node
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array An array of dimensions to dimension values
$removedNodes boolean If TRUE the result has ONLY removed nodes. If FALSE removed nodes are NOT inside the result. If NULL the result contains BOTH removed and non-removed nodes. (defaults to FALSE)
$recursive boolean If TRUE *all* matching nodes underneath the specified parent path are returned
Результат array<\Neos\ContentRepository\Domain\Model\NodeData>

findByParentAndNodeTypeInContext() публичный Метод

TODO Move to a new Node operation getDescendantNodes(...)
public findByParentAndNodeTypeInContext ( string $parentPath, string $nodeTypeFilter, Context $context, boolean $recursive = false ) : array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$parentPath string Absolute path of the parent node
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
$context Neos\ContentRepository\Domain\Service\Context The containing workspace
$recursive boolean If TRUE *all* matching nodes underneath the specified parent path are returned
Результат array<\Neos\ContentRepository\Domain\Model\NodeInterface>

findByParentAndNodeTypeRecursively() публичный Метод

Finds recursively nodes by its parent and (optionally) by its node type.
См. также: findByParentAndNodeType()
public findByParentAndNodeTypeRecursively ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean $removedNodes = false ) : array<\Neos\ContentRepository\Domain\Model\NodeData>
$parentPath string Absolute path of the parent node
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array An array of dimensions to dimension values
$removedNodes boolean If TRUE the result has ONLY removed nodes. If FALSE removed nodes are NOT inside the result. If NULL the result contains BOTH removed and non-removed nodes. (defaults to FALSE)
Результат array<\Neos\ContentRepository\Domain\Model\NodeData>

findByParentWithoutReduce() публичный Метод

Only used internally for setting the path of all child nodes
public findByParentWithoutReduce ( string $parentPath, Workspace $workspace ) : array<\Neos\ContentRepository\Domain\Model\NodeData>
$parentPath string
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат array<\Neos\ContentRepository\Domain\Model\NodeData>

findByPathWithoutReduce() публичный Метод

Internal method, used by Node::setPath
public findByPathWithoutReduce ( string $path, Workspace $workspace, boolean $includeRemovedNodes = false, boolean $recursive = false ) : array
$path string
$workspace Neos\ContentRepository\Domain\Model\Workspace
$includeRemovedNodes boolean Should removed nodes be included in the result (defaults to FALSE)
$recursive boolean
Результат array

findByProperties() публичный Метод

This method is internal and will be replaced with better search capabilities.
public findByProperties ( string | array $term, string $nodeTypeFilter, Workspace $workspace, array $dimensions, string $pathStartingPoint = null ) : array<\Neos\ContentRepository\Domain\Model\NodeData>
$term string | array Search term
$nodeTypeFilter string Node type filter
$workspace Neos\ContentRepository\Domain\Model\Workspace
$dimensions array
$pathStartingPoint string
Результат array<\Neos\ContentRepository\Domain\Model\NodeData>

findByWorkspace() публичный Метод

Shadow nodes are excluded, because they will be published when publishing the moved node.
public findByWorkspace ( Workspace $workspace ) : array
$workspace Neos\ContentRepository\Domain\Model\Workspace
Результат array

findFirstByParentAndNodeType() публичный Метод

Finds a single node by its parent and (optionally) by its node type
public findFirstByParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions, boolean $removedNodes = false ) : NodeData
$parentPath string Absolute path of the parent node
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array
$removedNodes boolean If TRUE the result has ONLY removed nodes. If FALSE removed nodes are NOT inside the result. If NULL the result contains BOTH removed and non-removed nodes. (defaults to FALSE)
Результат Neos\ContentRepository\Domain\Model\NodeData The node found or NULL

findFirstByParentAndNodeTypeInContext() публичный Метод

Finds a single node by its parent and (optionally) by its node type
public findFirstByParentAndNodeTypeInContext ( string $parentPath, string $nodeTypeFilter, Context $context ) : NodeData
$parentPath string Absolute path of the parent node
$nodeTypeFilter string Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
$context Neos\ContentRepository\Domain\Service\Context The containing context
Результат Neos\ContentRepository\Domain\Model\NodeData The node found or NULL

findNextFreeIndexInParentPath() защищенный Метод

Finds the next free index on the level below the given parent path across all workspaces.
protected findNextFreeIndexInParentPath ( string $parentPath ) : integer
$parentPath string Path of the parent node specifying the level in the node tree
Результат integer The next available index

findNextHigherIndex() защищенный Метод

The result is determined workspace-agnostic.
protected findNextHigherIndex ( string $parentPath, integer $referenceIndex ) : integer
$parentPath string Path of the parent node specifying the level in the node tree
$referenceIndex integer Index of a known node
Результат integer The currently next higher index or NULL if no node with a higher index exists

findNextLowerIndex() защищенный Метод

The result is determined workspace-agnostic.
protected findNextLowerIndex ( string $parentPath, integer $referenceIndex ) : integer
$parentPath string Path of the parent node specifying the level in the node tree
$referenceIndex integer Index of a known node
Результат integer The currently next lower index

findNodesByRelatedEntities() публичный Метод

Will return all possible NodeData objects that contain this identifiers. Note: This is an internal method that is likely to be replaced in the future. $objectTypeMap = array( 'Neos\Media\Domain\Model\Asset' => array('some-uuid-here'), 'Neos\Media\Domain\Model\ImageVariant' => array('some-uuid-here', 'another-uuid-here') )
public findNodesByRelatedEntities ( array $relationMap ) : array
$relationMap array
Результат array

findOnPath() публичный Метод

If some node does not exist in the specified workspace, this function will try to find a corresponding node in one of the base workspaces (if any).
public findOnPath ( string $pathStartingPoint, string $pathEndPoint, Workspace $workspace, array $dimensions = null, boolean $includeRemovedNodes = false, string $nodeTypeFilter = null ) : array<\Neos\ContentRepository\Domain\Model\NodeData>
$pathStartingPoint string Absolute path specifying the starting point
$pathEndPoint string Absolute path specifying the end point
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array Array of dimensions to array of dimension values
$includeRemovedNodes boolean Should removed nodes be included in the result (defaults to FALSE)
$nodeTypeFilter string Optional filter for the node type of the nodes, supports complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL)
Результат array<\Neos\ContentRepository\Domain\Model\NodeData>

findOneByIdentifier() публичный Метод

If the node does not exist in the specified workspace, this function will try to find one with the given identifier in one of the base workspaces (if any).
public findOneByIdentifier ( string $identifier, Workspace $workspace, array $dimensions = null ) : NodeData
$identifier string Identifier of the node
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array An array of dimensions with array of ordered values to use for fallback matching
Результат Neos\ContentRepository\Domain\Model\NodeData The matching node if found, otherwise NULL

findOneByPath() публичный Метод

Find a single node by exact path.
public findOneByPath ( string $path, Workspace $workspace, array $dimensions = null, boolean | null $removedNodes = false ) : NodeData
$path string Absolute path of the node
$workspace Neos\ContentRepository\Domain\Model\Workspace The containing workspace
$dimensions array An array of dimensions with array of ordered values to use for fallback matching
$removedNodes boolean | null Include removed nodes, NULL (all), FALSE (no removed nodes) or TRUE (only removed nodes)
Результат Neos\ContentRepository\Domain\Model\NodeData The matching node if found, otherwise NULL

findOneByPathInContext() публичный Метод

If the node does not exist in the specified context's workspace, this function will try to find one with the given path in one of the base workspaces (if any). Examples for valid paths: the root node foo node "foo" on the first level foo/bar node "bar" on the second level foo/ first node on second level, below "foo"
public findOneByPathInContext ( string $path, Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface | null
$path string Absolute path of the node
$context Neos\ContentRepository\Domain\Service\Context The containing context
Результат Neos\ContentRepository\Domain\Model\NodeInterface | null The matching node if found, otherwise NULL

findRawNodesByPath() защищенный Метод

To get a "usable" set of nodes, filtering by workspaces, dimensions and removed nodes must be done on the result.
protected findRawNodesByPath ( string $path, Workspace $workspace, array $dimensions = null, boolean $onlyShadowNodes = false ) : array
$path string
$workspace Neos\ContentRepository\Domain\Model\Workspace
$dimensions array
$onlyShadowNodes boolean
Результат array

findShadowNodeByPath() публичный Метод

Find a shadow node by exact path
public findShadowNodeByPath ( string $path, Workspace $workspace, array $dimensions = null ) : NodeData | null
$path string
$workspace Neos\ContentRepository\Domain\Model\Workspace
$dimensions array
Результат Neos\ContentRepository\Domain\Model\NodeData | null

flushNodeRegistry() публичный Метод

This method is (and should only be) used as a slot to the allObjectsPersisted signal.
public flushNodeRegistry ( ) : void
Результат void

getNodeDataForParentAndNodeType() защищенный Метод

Internal method
protected getNodeDataForParentAndNodeType ( string $parentPath, string $nodeTypeFilter, Workspace $workspace, array $dimensions = null, boolean | null $removedNodes = false, boolean $recursive = false ) : array
$parentPath string
$nodeTypeFilter string
$workspace Neos\ContentRepository\Domain\Model\Workspace
$dimensions array
$removedNodes boolean | null
$recursive boolean
Результат array

getNodeTypeFilterConstraints() защищенный Метод

protected getNodeTypeFilterConstraints ( Neos\Flow\Persistence\QueryInterface $query, $nodeTypeFilter ) : array
$query Neos\Flow\Persistence\QueryInterface
$nodeTypeFilter
Результат array

getNodeTypeFilterConstraintsForDql() защищенный Метод

Both are numeric arrays with the respective node types that are included or excluded.
protected getNodeTypeFilterConstraintsForDql ( string $nodeTypeFilter ) : array
$nodeTypeFilter string
Результат array

isInRemovedNodes() публичный Метод

Test if a given NodeData is in the set of removed node data objects
public isInRemovedNodes ( NodeData $nodeData ) : boolean
$nodeData Neos\ContentRepository\Domain\Model\NodeData
Результат boolean TRUE If the NodeData was marked for removal

openIndexSpace() защищенный Метод

All indices that are greater or equal to the given referenceIndex are incremented by 100
protected openIndexSpace ( string $parentPath, integer $referenceIndex )
$parentPath string
$referenceIndex integer

pathExists() публичный Метод

Find out if the given path exists anywhere in the CR. (internal) If you need this functionality use \Neos\ContentRepository\Domain\Service\NodeService::nodePathExistsInAnyContext()
public pathExists ( string $nodePath ) : boolean
$nodePath string
Результат boolean

persistEntities() публичный Метод

Persists all entities managed by the repository and all cascading dependencies
public persistEntities ( ) : void
Результат void

reduceNodeVariantsByWorkspaces() защищенный Метод

Given an array with duplicate nodes (from different workspaces) those are reduced to uniqueness (by node identifier and dimensions hash)
protected reduceNodeVariantsByWorkspaces ( array $nodes, array $workspaces ) : array
$nodes array NodeData
$workspaces array
Результат array Array of unique node results indexed by identifier and dimensions hash

reduceNodeVariantsByWorkspacesAndDimensions() защищенный Метод

Given an array with duplicate nodes (from different workspaces and dimensions) those are reduced to uniqueness (by node identifier)
protected reduceNodeVariantsByWorkspacesAndDimensions ( array $nodes, array $workspaces, array $dimensions ) : array
$nodes array NodeData result with multiple and duplicate identifiers (different nodes and redundant results for node variants with different dimensions)
$workspaces array
$dimensions array
Результат array Array of unique node results indexed by identifier

remove() публичный Метод

This repository keeps track of added and removed nodes (additionally to the other Unit of Work) in order to find in-memory nodes.
public remove ( object $object ) : void
$object object The object to remove
Результат void

removeAllInPath() публичный Метод

Remove all nodes below a given path. Does not care about workspaces and dimensions.
public removeAllInPath ( string $path ) : void
$path string Starting point path underneath all nodes are to be removed.
Результат void

reset() публичный Метод

Reset instances (internal).
См. также: flushNodeRegistry()
Устаревший: Use flushNodeRegistry()
public reset ( ) : void
Результат void

setHighestIndexInParentPath() защищенный Метод

protected setHighestIndexInParentPath ( string $parentPath, integer $highestIndex ) : void
$parentPath string
$highestIndex integer
Результат void

setNewIndex() публичный Метод

If the position is "before" or "after", an index will be chosen which makes the given node the previous or next node of the given reference node. If the position "last" is specified, an index higher than any existing index will be chosen. If no free index is available between two nodes (for "before" and "after"), the whole index of the current node level will be renumbered.
public setNewIndex ( NodeData $node, integer $position, Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode = null ) : void
$node Neos\ContentRepository\Domain\Model\NodeData The node to set the new index for
$position integer The position the new index should reflect, must be one of the POSITION_* constants
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface The reference node. Mandatory for POSITION_BEFORE and POSITION_AFTER
Результат void

sortNodesByIndex() защищенный Метод

Sorts the given nodes by their index
protected sortNodesByIndex ( array $nodes ) : array
$nodes array Nodes
Результат array Nodes sorted by index

Описание свойств

$addedNodes защищенное свойство

protected SplObjectStorage $addedNodes
Результат SplObjectStorage

$defaultOrderings защищенное свойство

protected array $defaultOrderings
Результат array

$entityManager защищенное свойство

..
protected ObjectManager,Doctrine\Common\Persistence $entityManager
Результат Doctrine\Common\Persistence\ObjectManager

$highestIndexCache защищенное свойство

protected array $highestIndexCache
Результат array

$nodeFactory защищенное свойство

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Результат Neos\ContentRepository\Domain\Factory\NodeFactory

$nodeTypeManager защищенное свойство

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Результат Neos\ContentRepository\Domain\Service\NodeTypeManager

$removedNodes защищенное свойство

protected SplObjectStorage $removedNodes
Результат SplObjectStorage

$securityContext защищенное свойство

protected Context,Neos\Flow\Security $securityContext
Результат Neos\Flow\Security\Context

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface