PropertyAwareNodePrivilegeContext
class PropertyAwareNodePrivilegeContext extends NodePrivilegeContext (View source)
An Eel context matching expression for the node privileges including node properties.
Properties
protected Context | $securityContext | from NodePrivilegeContext | |
protected ContentRepositoryRegistry | $contentRepositoryRegistry | from NodePrivilegeContext | |
protected | $node | from NodePrivilegeContext | |
protected | $subgraph | from NodePrivilegeContext | |
protected array<int,string> | $propertyNames |
Methods
Matches if the selected node is an ancestor of the given node specified by $nodePathOrIdentifier
Matches if the selected node is a descendant of the given node specified by $nodePathOrIdentifier
Matches if the selected node is a descendant or ancestor of the given node specified by $nodePathOrIdentifier
Matches if the selected node is of the given NodeType(s).
Matches if the selected node belongs to one of the given $workspaceNames
Matches if the currently-selected preset in the passed $dimensionName is one of $presets.
Resolves the given $nodePathOrIdentifier and returns its absolute path and or a boolean, if the result directly matches the currently selected node
No description
No description
Whether or not this context is bound to specific properties
Details
__construct(Node $node)
No description
bool
isAncestorNodeOf(string $nodePathOrIdentifier)
Matches if the selected node is an ancestor of the given node specified by $nodePathOrIdentifier
Example: isAncestorNodeOf('/sites/some/path') matches for the nodes "/sites", "/sites/some" and "/sites/some/path" but not for "/sites/some/other"
bool
isDescendantNodeOf(string $nodePathOrIdentifier)
Matches if the selected node is a descendant of the given node specified by $nodePathOrIdentifier
Example: isDescendantNodeOf('/sites/some/path') matches for the nodes "/sites/some/path", "/sites/some/path/subnode" but not for "/sites/some/other"
bool
isAncestorOrDescendantNodeOf(string $nodePathOrIdentifier)
Matches if the selected node is a descendant or ancestor of the given node specified by $nodePathOrIdentifier
Example: isAncestorOrDescendantNodeOf('/sites/some') matches for the nodes "/sites", "/sites/some", "/sites/some/sub" but not "/sites/other"
bool
nodeIsOfType(string|array $nodeTypes)
Matches if the selected node is of the given NodeType(s).
If multiple types are specified, only one entry has to match
Example: nodeIsOfType(['Neos.ContentRepository:NodeType1', 'Neos.ContentRepository:NodeType2'] matches, if the selected node is of (sub) type Neos.ContentRepository:NodeType1 or Neos.ContentRepository:NodeType1
bool
isInWorkspace(array $workspaceNames)
Matches if the selected node belongs to one of the given $workspaceNames
Example: isInWorkspace(['live', 'user-admin']) matches, if the selected node is in one of the workspaces "user-admin" or "live"
bool
isInDimensionPreset(string $dimensionName, string|array $presets)
Matches if the currently-selected preset in the passed $dimensionName is one of $presets.
Example: isInDimensionPreset('language', 'de') checks whether the currently-selected language preset (in the Neos backend) is "de".
Implementation Note: We deliberately work on the Dimension Preset Name, and not on the dimension values itself; as the preset is user-visible and the actual dimension-values for a preset are just implementation details.
protected bool|string
resolveNodePathOrResult(string $nodePathOrIdentifier)
Resolves the given $nodePathOrIdentifier and returns its absolute path and or a boolean, if the result directly matches the currently selected node
bool
nodePropertyIsIn(string|array $propertyNames)
No description
array
getNodePropertyNames()
No description
bool
hasProperties()
Whether or not this context is bound to specific properties