bundle/Controller/API/LoadSubItems.php
private function buildPath(LocationInterface $location): array
    {
        $path = [];

        while (true) {
            $path[] = [
                'id' => $location->getLocationId(),
                'name' => $location->getName(),
            ];

            if ($location->getParentId() === null) {
                break;
            }

            try {
                $location = $this->backend->loadLocation($location->getParentId());
            } catch (NotFoundException $e) {
                break;
            }
        }

        return array_reverse($path);
    }
private function buildPath(LocationInterface $location): array
    {
        $path = [];

        while (true) {
            $path[] = [
                'id' => $location->getLocationId(),
                'name' => $location->getName(),
            ];

            if ($location->getParentId() === null) {
                break;
            }

            try {
                $location = $this->backend->loadLocation($location->getParentId());
            } catch (NotFoundException $e) {
                break;
            }
        }

        return array_reverse($path);
    }
private function buildPath ( LocationInterface $ location ) : array { $ path = [ ] ; while ( true ) { $ path [ ] = [ 'id' => $ location -> getLocationId ( ) , 'name' => $ location -> getName ( ) , ] ; if ( $ location -> getParentId ( ) === null ) { break ; } try { $ location = $ this -> backend -> loadLocation ( $ location -> getParentId ( ) ) ; } catch ( NotFoundException $ e ) { break ; } } return array_reverse ( $ path ) ; }
Builds the path array for specified item.
Builds the path array for specified item .