final class ContentRepository (View source)

Main Entry Point to the system. Encapsulates the full event-sourced Content Repository.

Use this to:

  • send commands to the system (to mutate state) via {\Neos\ContentRepository\Core\self::handle()}
  • access the content graph read model
  • access 3rd party read models via {\Neos\ContentRepository\Core\self::projectionState()}

Methods

__construct(ContentRepositoryId $id, CommandBus $commandBus, EventStoreInterface $eventStore, EventNormalizer $eventNormalizer, SubscriptionEngine $subscriptionEngine, NodeTypeManager $nodeTypeManager, InterDimensionalVariationGraph $variationGraph, ContentDimensionSourceInterface $contentDimensionSource, AuthProviderInterface $authProvider, ClockInterface $clock, ContentGraphReadModelInterface $contentGraphReadModel, CommandHookInterface $commandHook, ProjectionStates $projectionStates, PerformanceTracerInterface|null $performanceTracer)

No description

void
handle(CommandInterface $command)

The only API to send commands (mutation intentions) to the system.

projectionState(string $projectionStateClassName)

No description

getContentGraph(WorkspaceName $workspaceName)

No description

getContentSubgraph(WorkspaceName $workspaceName, DimensionSpacePoint $dimensionSpacePoint)

Main API to retrieve a content subgraph, taking VisibilityConstraints of the current user into account ({AuthProviderInterface::getVisibilityConstraints()})

Workspace|null
findWorkspaceByName(WorkspaceName $workspaceName)

Returns the workspace with the given name, or NULL if it does not exist in this content repository

findWorkspaces()

Returns all workspaces of this content repository. To limit the set, {Workspaces::find()} and {Workspaces::filter()} can be used as well as {Workspaces::getBaseWorkspaces()} and {Workspaces::getDependantWorkspacesRecursively()}.

Details

__construct(ContentRepositoryId $id, CommandBus $commandBus, EventStoreInterface $eventStore, EventNormalizer $eventNormalizer, SubscriptionEngine $subscriptionEngine, NodeTypeManager $nodeTypeManager, InterDimensionalVariationGraph $variationGraph, ContentDimensionSourceInterface $contentDimensionSource, AuthProviderInterface $authProvider, ClockInterface $clock, ContentGraphReadModelInterface $contentGraphReadModel, CommandHookInterface $commandHook, ProjectionStates $projectionStates, PerformanceTracerInterface|null $performanceTracer)

internal  use the {@see \Neos\ContentRepository\Core\ContentRepositoryFactory::getOrBuild()} to instantiate
 

No description

Parameters

ContentRepositoryId $id
CommandBus $commandBus
EventStoreInterface $eventStore
EventNormalizer $eventNormalizer
SubscriptionEngine $subscriptionEngine
NodeTypeManager $nodeTypeManager
InterDimensionalVariationGraph $variationGraph
ContentDimensionSourceInterface $contentDimensionSource
AuthProviderInterface $authProvider
ClockInterface $clock
ContentGraphReadModelInterface $contentGraphReadModel
CommandHookInterface $commandHook
ProjectionStates $projectionStates
PerformanceTracerInterface|null $performanceTracer

void handle(CommandInterface $command)

The only API to send commands (mutation intentions) to the system.

Parameters

CommandInterface $command

Return Value

void

Exceptions

AccessDenied

ProjectionStateInterface projectionState(string $projectionStateClassName)

No description

Parameters

string $projectionStateClassName

Return Value

ProjectionStateInterface

ContentGraphInterface getContentGraph(WorkspaceName $workspaceName)

No description

Parameters

WorkspaceName $workspaceName

Return Value

ContentGraphInterface

Exceptions

WorkspaceDoesNotExist
AccessDenied

ContentSubgraphInterface getContentSubgraph(WorkspaceName $workspaceName, DimensionSpacePoint $dimensionSpacePoint)

Main API to retrieve a content subgraph, taking VisibilityConstraints of the current user into account ({AuthProviderInterface::getVisibilityConstraints()})

Parameters

WorkspaceName $workspaceName
DimensionSpacePoint $dimensionSpacePoint

Return Value

ContentSubgraphInterface

Exceptions

WorkspaceDoesNotExist
AccessDenied

Workspace|null findWorkspaceByName(WorkspaceName $workspaceName)

Returns the workspace with the given name, or NULL if it does not exist in this content repository

Parameters

WorkspaceName $workspaceName

Return Value

Workspace|null

Workspaces findWorkspaces()

Returns all workspaces of this content repository. To limit the set, {Workspaces::find()} and {Workspaces::filter()} can be used as well as {Workspaces::getBaseWorkspaces()} and {Workspaces::getDependantWorkspacesRecursively()}.

Return Value

Workspaces

NodeTypeManager getNodeTypeManager()

No description

Return Value

NodeTypeManager

InterDimensionalVariationGraph getVariationGraph()

No description

ContentDimensionSourceInterface getContentDimensionSource()

No description