PHP Класс Neos\ContentRepository\Utility

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

buildAutoCreatedChildNodeIdentifier() публичный статический Метод

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
Результат string The generated UUID like identifier

renderValidNodeName() публичный статический Метод

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
Результат string A valid node name

sortDimensionValueArrayAndReturnDimensionsHash() публичный статический Метод

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.
Результат string the calculated DimensionsHash