Neos\Neos\Domain\Service\ContentContextFactory::getIdentifierSource PHP Метод

getIdentifierSource() защищенный Метод

This creates the actual identifier and needs to be overridden by builders extending this.
protected getIdentifierSource ( array $contextProperties ) : string
$contextProperties array
Результат string
    protected function getIdentifierSource(array $contextProperties)
    {
        ksort($contextProperties);
        $identifierSource = $this->contextImplementation;
        foreach ($contextProperties as $propertyName => $propertyValue) {
            if ($propertyName === 'dimensions') {
                $stringParts = array();
                foreach ($propertyValue as $dimensionName => $dimensionValues) {
                    $stringParts[] = $dimensionName . '=' . implode(',', $dimensionValues);
                }
                $stringValue = implode('&', $stringParts);
            } elseif ($propertyName === 'targetDimensions') {
                $stringParts = array();
                foreach ($propertyValue as $dimensionName => $dimensionValue) {
                    $stringParts[] = $dimensionName . '=' . $dimensionValue;
                }
                $stringValue = implode('&', $stringParts);
            } elseif ($propertyValue instanceof \DateTimeInterface) {
                $stringValue = $propertyValue->getTimestamp();
            } elseif ($propertyValue instanceof Site) {
                $stringValue = $propertyValue->getNodeName();
            } elseif ($propertyValue instanceof Domain) {
                $stringValue = $propertyValue->getHostname();
            } else {
                $stringValue = (string) $propertyValue;
            }
            $identifierSource .= ':' . $stringValue;
        }
        return $identifierSource;
    }