CreateNodePrivilegeContext
class CreateNodePrivilegeContext extends NodePrivilegeContext (View source)
An Eel context matching expression for the CreateNodePrivilege
Properties
protected TransientNodeCache | $transientNodeCache | from NodePrivilegeContext | |
protected ContextFactory | $contextFactory | from NodePrivilegeContext | |
protected Context | $securityContext | from NodePrivilegeContext | |
protected ContentDimensionPresetSourceInterface | $contentDimensionPresetSource | from NodePrivilegeContext | |
protected NodeInterface | $node | from NodePrivilegeContext | |
protected string | $creationNodeTypes |
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). If multiple types are specified, only one entry has to match
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
Returns a node from the given $nodeIdentifier (disabling authorization checks)
No description
No description
Details
__construct(NodeInterface $node = null)
No description
void
setNode(NodeInterface $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
resolveNodePath(string $nodePathOrIdentifier)
Resolves the given $nodePathOrIdentifier and returns its absolute path and or a boolean if the result directly matches the currently selected node
protected NodeInterface
getNodeByIdentifier(string $nodeIdentifier)
Returns a node from the given $nodeIdentifier (disabling authorization checks)
bool
createdNodeIsOfType(string|array $creationNodeTypes)
No description
array
getCreationNodeTypes()
No description