VisibilityConstraints
final class VisibilityConstraints implements JsonSerializable (View source)
The visibility constraints define how nodes in the content subgraph are accessed.
For this the constraints need to be provided to {\Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface::getSubgraph()}. Alternatively {\Neos\ContentRepository\Core\ContentRepository::getContentSubgraph()} uses the implemented {\Neos\ContentRepository\Core\Feature\Security\AuthProviderInterface} to determine the visibility constraint the current applications state via {[\Neos\ContentRepository\Core\Feature\Security\AuthProviderInterface::getVisibilityConstraints()}
To](../../../../../Neos/ContentRepository/Core/Feature/Security/AuthProviderInterface.html) have nodes for example with the tag my-disabled excluded use:
VisibilityConstraints::excludeSubtreeTags(SubtreeTags::create(
SubtreeTag::fromString("my-disabled")
));
But to access them no constraints can be used includes those:
VisibilityConstraints::createEmpty(); Methods
A subgraph without constraints for finding all nodes without filtering
No description
No description
Please use {VisibilityConstraints::excludeSubtreeTags} instead.
Legacy, only for Neos.Neos context!, for standalone use please use {self::excludeSubtreeTags()}
Legacy, only for Neos.Neos context!, for standalone use please use {self::createEmpty()}
Details
static VisibilityConstraints
createEmpty()
A subgraph without constraints for finding all nodes without filtering
static VisibilityConstraints
excludeSubtreeTags(SubtreeTags $subtreeTags)
No description
string
getHash()
No description
VisibilityConstraints
merge(VisibilityConstraints $other)
No description
array
jsonSerialize()
No description
static VisibilityConstraints
fromTagConstraints(SubtreeTags $tagConstraints)
deprecated
deprecated
Please use {VisibilityConstraints::excludeSubtreeTags} instead.
static VisibilityConstraints
default()
deprecated
deprecated
Legacy, only for Neos.Neos context!, for standalone use please use {self::excludeSubtreeTags()}
Please look into {\Neos\Neos\Domain\SubtreeTagging\NeosVisibilityConstraints} instead.
static VisibilityConstraints
withoutRestrictions()
deprecated
deprecated
Legacy, only for Neos.Neos context!, for standalone use please use {self::createEmpty()}
A subgraph without constraints for finding all nodes without filtering
Nodes for example with tag disabled will be findable but not soft removed nodes
For backwards compatibility to previous betas this method does not do what it promises. The classic Neos backend use-case previously used this method to be able to find also disabled nodes. Now with the introduction of soft removed tags, empty constraints will cause nodes to show up that were previously non-existent. Thus, this factory restricts 'removed' after all.
Please use {\Neos\Neos\Domain\SubtreeTagging\NeosVisibilityConstraints::excludeRemoved()} instead.