PHP Class Neos\ContentRepository\Utility

Datei anzeigen Open project: neos/neos-development-collection Class Usage Examples

Public Methods

Method 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 method

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
return string The generated UUID like identifier

renderValidNodeName() public static method

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
return string A valid node name

sortDimensionValueArrayAndReturnDimensionsHash() public static method

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.
return string the calculated DimensionsHash