PHP Class Neos\ContentRepository\Utility

Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Méthodes publiques

Méthode Description
buildAutoCreatedChildNodeIdentifier ( string $childNodeName, string $identifier ) : string Generate a stable identifier for auto-created child nodes
renderValidNodeName ( string $name ) : string Transforms a text (for example a node title) into a valid node name by removing invalid characters and transliterating special characters if possible.
sortDimensionValueArrayAndReturnDimensionsHash ( array &$dimensionValues ) : string Sorts the incoming $dimensionValues array to make sure that before hashing, the ordering is made deterministic.

Method Details

buildAutoCreatedChildNodeIdentifier() public static méthode

This is needed if multiple node variants are created through "createNode" with different dimension values. If child nodes with the same path and different identifiers exist, bad things can happen.
public static buildAutoCreatedChildNodeIdentifier ( string $childNodeName, string $identifier ) : string
$childNodeName string
$identifier string Identifier of the node where the child node should be created
Résultat string The generated UUID like identifier

renderValidNodeName() public static méthode

Transforms a text (for example a node title) into a valid node name by removing invalid characters and transliterating special characters if possible.
public static renderValidNodeName ( string $name ) : string
$name string The possibly invalid node name
Résultat string A valid node name

sortDimensionValueArrayAndReturnDimensionsHash() public static méthode

Then, calculates and returns the dimensionsHash. This method is public because it is used inside SiteImportService.
public static sortDimensionValueArrayAndReturnDimensionsHash ( array &$dimensionValues ) : string
$dimensionValues array Map of dimension names to dimension values, which will be ordered alphabetically after this method.
Résultat string the calculated DimensionsHash