bundle/Templating/Twig/Runtime/EzPublishRuntime.php
public function getLocationPath($locationId): array
    {
        try {
            $location = $this->loadLocation($locationId);

            $locationPath = $location->path;
            array_shift($locationPath);

            $translatedNames = [];

            foreach ($locationPath as $locationPathId) {
                $locationInPath = $this->loadLocation($locationPathId);
                $translatedNames[] = $this->getContentName($locationInPath->contentInfo->id);
            }

            return $translatedNames;
        } catch (Throwable $t) {
            return [];
        }
    }
public function getLocationPath($locationId): array
    {
        try {
            $location = $this->loadLocation($locationId);

            $locationPath = $location->path;
            array_shift($locationPath);

            $translatedNames = [];

            foreach ($locationPath as $locationPathId) {
                $locationInPath = $this->loadLocation($locationPathId);
                $translatedNames[] = $this->getContentName($locationInPath->contentInfo->id);
            }

            return $translatedNames;
        } catch (Throwable $t) {
            return [];
        }
    }
public function getLocationPath ( $ locationId ) : array { try { $ location = $ this -> loadLocation ( $ locationId ) ; $ locationPath = $ location -> path ; array_shift ( $ locationPath ) ; $ translatedNames = [ ] ; foreach ( $ locationPath as $ locationPathId ) { $ locationInPath = $ this -> loadLocation ( $ locationPathId ) ; $ translatedNames [ ] = $ this -> getContentName ( $ locationInPath -> contentInfo -> id ) ; } return $ translatedNames ; } catch ( Throwable $ t ) { return [ ] ; } }
Returns the location path.

@param int|string $locationId

@return string[]
Returns the location path .