PHP 클래스 Neos\ContentRepository\Domain\Utility\NodePaths

파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

공개 메소드들

메소드 설명
addNodePathSegment ( string $nodePath, string $nodePathSegment ) : string Appends the given $nodePathSegment to the $nodePath
explodeContextPath ( string $contextPath ) : array Splits the given context path into relevant information, which results in an array with keys: "nodePath", "workspaceName", "dimensions"
generateContextPath ( string $path, string $workspaceName, array $dimensionValues = [] ) : string Returns the given absolute node path appended with additional context information (such as the workspace name and dimensions).
generateRandomNodeName ( ) : string Generates a simple random node name.
getNodeNameFromPath ( string $path ) : string Get the name for a Node based on the given path.
getParentPath ( string $path ) : string Get the parent path of the given Node path.
getPathDepth ( string $path ) : integer Returns the depth of the given Node path.
getRelativePathBetween ( string $parentPath, string $subPath ) : string Get the relative path between the given $parentPath and the given $subPath.
isContextPath ( string $contextPath ) : boolean Determine if the given node path is a context path.
isSubPathOf ( string $path, string $possibleSubPath ) : boolean Does $possibleSubPath begin with $path and so is a subpath or not.
normalizePath ( $path, string $referencePath = null ) : string Normalizes the given node path to a reference path and returns an absolute path.
parseDimensionValueStringToArray ( string $dimensionValueString ) : array
replaceRelativePathElements ( string $path ) : string Replaces relative path segments ("." or ".

메소드 상세

addNodePathSegment() 공개 정적인 메소드

Appends the given $nodePathSegment to the $nodePath
public static addNodePathSegment ( string $nodePath, string $nodePathSegment ) : string
$nodePath string Absolute node path
$nodePathSegment string Usually a nodeName but could also be a relative node path.
리턴 string

explodeContextPath() 공개 정적인 메소드

Splits the given context path into relevant information, which results in an array with keys: "nodePath", "workspaceName", "dimensions"
또한 보기: generateContextPath()
public static explodeContextPath ( string $contextPath ) : array
$contextPath string a context path including workspace and/or dimension information.
리턴 array split information from the context path

generateContextPath() 공개 정적인 메소드

Returns the given absolute node path appended with additional context information (such as the workspace name and dimensions).
public static generateContextPath ( string $path, string $workspaceName, array $dimensionValues = [] ) : string
$path string absolute node path
$workspaceName string
$dimensionValues array
리턴 string

generateRandomNodeName() 공개 정적인 메소드

Generates a simple random node name.
public static generateRandomNodeName ( ) : string
리턴 string

getNodeNameFromPath() 공개 정적인 메소드

Get the name for a Node based on the given path.
public static getNodeNameFromPath ( string $path ) : string
$path string
리턴 string

getParentPath() 공개 정적인 메소드

Get the parent path of the given Node path.
public static getParentPath ( string $path ) : string
$path string
리턴 string

getPathDepth() 공개 정적인 메소드

The root node "/" has depth 0, for every segment 1 is added.
public static getPathDepth ( string $path ) : integer
$path string
리턴 integer

getRelativePathBetween() 공개 정적인 메소드

Example with "/foo" and "/foo/bar/baz" will return "bar/baz".
public static getRelativePathBetween ( string $parentPath, string $subPath ) : string
$parentPath string
$subPath string
리턴 string

isContextPath() 공개 정적인 메소드

Determine if the given node path is a context path.
public static isContextPath ( string $contextPath ) : boolean
$contextPath string
리턴 boolean

isSubPathOf() 공개 정적인 메소드

Does $possibleSubPath begin with $path and so is a subpath or not.
public static isSubPathOf ( string $path, string $possibleSubPath ) : boolean
$path string
$possibleSubPath string
리턴 boolean

normalizePath() 공개 정적인 메소드

You should usually use \Neos\ContentRepository\Domain\Service\NodeService::normalizePath() because functionality could be overloaded, this is here only for low level operations.
또한 보기: Neos\ContentRepository\Domain\Service\NodeService::normalizePath()
public static normalizePath ( $path, string $referencePath = null ) : string
$path
$referencePath string
리턴 string

parseDimensionValueStringToArray() 공개 정적인 메소드

public static parseDimensionValueStringToArray ( string $dimensionValueString ) : array
$dimensionValueString string
리턴 array

replaceRelativePathElements() 공개 정적인 메소드

.") in a given path
public static replaceRelativePathElements ( string $path ) : string
$path string absolute node path with relative path elements ("." or "..").
리턴 string