Neos.Neos/Classes/Utility/NodeUriPathSegmentGenerator.php
public function generateUriPathSegment(NodeInterface $node = null, $text = null)
    {
        if ($node) {
            $text = $text ?: $node->getLabel() ?: $node->getName();
            $dimensions = $node->getContext()->getDimensions();
            if (array_key_exists('language', $dimensions) && $dimensions['language'] !== []) {
                $locale = new Locale($dimensions['language'][0]);
                $language = $locale->getLanguage();
            }
        } elseif (strlen($text) === 0) {
            throw new Exception('Given text was empty.', 1457591815);
        }
        $text = $this->transliterationService->transliterate($text, isset($language) ? $language : null);
        return Transliterator::urlize($text);
    }
public function generateUriPathSegment(NodeInterface $node = null, $text = null)
    {
        if ($node) {
            $text = $text ?: $node->getLabel() ?: $node->getName();
            $dimensions = $node->getContext()->getDimensions();
            if (array_key_exists('language', $dimensions) && $dimensions['language'] !== []) {
                $locale = new Locale($dimensions['language'][0]);
                $language = $locale->getLanguage();
            }
        } elseif (strlen($text) === 0) {
            throw new Exception('Given text was empty.', 1457591815);
        }
        $text = $this->transliterationService->transliterate($text, isset($language) ? $language : null);
        return Transliterator::urlize($text);
    }
public function generateUriPathSegment ( NodeInterface $ node = null , $ text = null ) { if ( $ node ) { $ text = $ text ? : $ node -> getLabel ( ) ? : $ node -> getName ( ) ; $ dimensions = $ node -> getContext ( ) -> getDimensions ( ) ; if ( array_key_exists ( 'language' , $ dimensions ) && $ dimensions [ 'language' ] !== [ ] ) { $ locale = new Locale ( $ dimensions [ 'language' ] [ 0 ] ) ; $ language = $ locale -> getLanguage ( ) ; } } elseif ( strlen ( $ text ) === 0 ) { throw new Exception ( 'Given text was empty.' , 1457591815 ) ; } $ text = $ this -> transliterationService -> transliterate ( $ text , isset ( $ language ) ? $ language : null ) ; return Transliterator :: urlize ( $ text ) ; }
Generates a URI path segment for a given node taking it's language dimension into account

@param NodeInterface $node Optional node to determine language dimension
@param string $text Optional text
@return string
Generates a URI path segment for a given node taking it s language dimension into account