NodePaths
abstract class NodePaths (View source)
Provides basic logic concerning node paths.
Methods
Appends the given $nodePathSegment to the $nodePath
Returns the given absolute node path appended with additional context information (such as the workspace name and dimensions).
Splits the given context path into relevant information, which results in an array with keys: "nodePath", "workspaceName", "dimensions"
No description
Determine if the given node path is a context path.
Get the name for a Node based on the given path.
Get the parent path of the given Node path.
Does $possibleSubPath begin with $path and so is a subpath or not.
Returns the depth of the given Node path.
Replaces relative path segments ("." or "..") in a given path
Get the relative path between the given $parentPath and the given $subPath.
Generates a simple random node name.
Normalizes the given node path to a reference path and returns an absolute path.
Details
static string
addNodePathSegment(string $nodePath, string $nodePathSegment)
Appends the given $nodePathSegment to the $nodePath
static string
generateContextPath(string $path, string $workspaceName, array $dimensionValues = [])
Returns the given absolute node path appended with additional context information (such as the workspace name and dimensions).
static array
explodeContextPath(string $contextPath)
Splits the given context path into relevant information, which results in an array with keys: "nodePath", "workspaceName", "dimensions"
static array
parseDimensionValueStringToArray(string $dimensionValueString)
No description
static bool
isContextPath(string $contextPath)
Determine if the given node path is a context path.
static string
getNodeNameFromPath(string $path)
Get the name for a Node based on the given path.
static string
getParentPath(string $path)
Get the parent path of the given Node path.
static bool
isSubPathOf(string $path, string $possibleSubPath)
Does $possibleSubPath begin with $path and so is a subpath or not.
static int
getPathDepth(string $path)
Returns the depth of the given Node path.
The root node "/" has depth 0, for every segment 1 is added.
static string
replaceRelativePathElements(string $path)
Replaces relative path segments ("." or "..") in a given path
static string
getRelativePathBetween(string $parentPath, string $subPath)
Get the relative path between the given $parentPath and the given $subPath.
Example with "/foo" and "/foo/bar/baz" will return "bar/baz".
static string
generateRandomNodeName()
Generates a simple random node name.
static string
normalizePath($path, string $referencePath = null)
Normalizes the given node path to a reference path and returns an absolute path.
You should usually use \Neos\ContentRepository\Domain\Service\NodeService::normalizePath() because functionality could be overloaded, this is here only for low level operations.