PHP 클래스 Sulu\Component\Util\SuluNodeHelper

Note this should be removed when we have domain objects.
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( PHPCR\SessionInterface $session, string $languageNamespace, array $paths )
extractSnippetTypeFromPath ( string $path ) : string Extract the snippet path from the given path.
extractWebspaceFromPath ( string $path ) : string Extracts webspace key from given path.
getLanguagesForNode ( PHPCR\NodeInterface $node ) : array Return the languages that are currently registered on the given PHPCR node.
getLocalizedPropertyValues ( PHPCR\NodeInterface $node, string $name ) Return all the localized values of the localized property indicated by $name.
getNextNode ( PHPCR\NodeInterface $node ) Return the next node of the given node.
getPreviousNode ( PHPCR\NodeInterface $node ) Return the previous node of the given node.
getStructureTypeForNode ( PHPCR\NodeInterface $node ) : string Return the structure type for the given node.
getTranslatedProperty ( Sulu\Component\Content\Compat\PropertyInterface $property, string $locale, string $prefix = null ) : Sulu\Component\Content\Compat\PropertyInterface Return translated property.
getTranslatedPropertyName ( string $propertyName, string $locale ) : string Return translated property name.
hasSuluNodeType ( PHPCR\NodeInterface $node, string | array $suluNodeTypes ) : boolean Return true if the given node has the given nodeType property (or properties).

비공개 메소드들

메소드 설명
getPath ( string $name ) : string Return the configured named path segment.
getSiblingNode ( PHPCR\NodeInterface $node, boolean $previous = false ) : PHPCR\NodeInterface | null Return either the next or previous sibling of the given node according to the $previous flag.

메소드 상세

__construct() 공개 메소드

public __construct ( PHPCR\SessionInterface $session, string $languageNamespace, array $paths )
$session PHPCR\SessionInterface
$languageNamespace string
$paths array Path segments from configuration

extractSnippetTypeFromPath() 공개 메소드

Extract the snippet path from the given path.
public extractSnippetTypeFromPath ( string $path ) : string
$path string
리턴 string

extractWebspaceFromPath() 공개 메소드

TODO: We should inject the base path here
public extractWebspaceFromPath ( string $path ) : string
$path string path of node
리턴 string

getLanguagesForNode() 공개 메소드

Return the languages that are currently registered on the given PHPCR node.
public getLanguagesForNode ( PHPCR\NodeInterface $node ) : array
$node PHPCR\NodeInterface
리턴 array

getLocalizedPropertyValues() 공개 메소드

Return all the localized values of the localized property indicated by $name.
public getLocalizedPropertyValues ( PHPCR\NodeInterface $node, string $name )
$node PHPCR\NodeInterface
$name string Name of localized property

getNextNode() 공개 메소드

Return the next node of the given node.
또한 보기: getSiblingNode
public getNextNode ( PHPCR\NodeInterface $node )
$node PHPCR\NodeInterface

getPreviousNode() 공개 메소드

Return the previous node of the given node.
또한 보기: getSiblingNode
public getPreviousNode ( PHPCR\NodeInterface $node )
$node PHPCR\NodeInterface

getStructureTypeForNode() 공개 메소드

Return the structure type for the given node.
public getStructureTypeForNode ( PHPCR\NodeInterface $node ) : string
$node PHPCR\NodeInterface
리턴 string

getTranslatedProperty() 공개 메소드

Return translated property.
public getTranslatedProperty ( Sulu\Component\Content\Compat\PropertyInterface $property, string $locale, string $prefix = null ) : Sulu\Component\Content\Compat\PropertyInterface
$property Sulu\Component\Content\Compat\PropertyInterface
$locale string
$prefix string
리턴 Sulu\Component\Content\Compat\PropertyInterface

getTranslatedPropertyName() 공개 메소드

Return translated property name.
public getTranslatedPropertyName ( string $propertyName, string $locale ) : string
$propertyName string
$locale string
리턴 string

hasSuluNodeType() 공개 메소드

The sulu node type is the local name of node types with the sulu namespace. Example: sulu:snippet is the PHPCR node type snippet is the Sulu node type
public hasSuluNodeType ( PHPCR\NodeInterface $node, string | array $suluNodeTypes ) : boolean
$node PHPCR\NodeInterface
$suluNodeTypes string | array One or more node sulu types
리턴 boolean