public function loadLocationsForContent($contentId, Request $request)
    {
        $restLocations = array();
        $contentInfo = $this->contentService->loadContentInfo($contentId);
        foreach ($this->locationService->loadLocations($contentInfo) as $location) {
            $restLocations[] = new Values\RestLocation(
                $location,
                // @todo Remove, and make optional in VO. Not needed for a location list.
                $this->locationService->getLocationChildCount($location)
            );
        }

        return new Values\CachedValue(
            new Values\LocationList($restLocations, $request->getPathInfo()),
            array('locationId' => $contentInfo->mainLocationId)
        );
    }
public function loadLocationsForContent($contentId, Request $request)
    {
        $restLocations = array();
        $contentInfo = $this->contentService->loadContentInfo($contentId);
        foreach ($this->locationService->loadLocations($contentInfo) as $location) {
            $restLocations[] = new Values\RestLocation(
                $location,
                // @todo Remove, and make optional in VO. Not needed for a location list.
                $this->locationService->getLocationChildCount($location)
            );
        }

        return new Values\CachedValue(
            new Values\LocationList($restLocations, $request->getPathInfo()),
            array('locationId' => $contentInfo->mainLocationId)
        );
    }
public function loadLocationsForContent ( $ contentId , Request $ request ) { $ restLocations = array ( ) ; $ contentInfo = $ this -> contentService -> loadContentInfo ( $ contentId ) ; foreach ( $ this -> locationService -> loadLocations ( $ contentInfo ) as $ location ) { $ restLocations [ ] = new Values \ RestLocation ( $ location , // @todo Remove, and make optional in VO. Not needed for a location list. $ this -> locationService -> getLocationChildCount ( $ location ) ) ; } return new Values \ CachedValue ( new Values \ LocationList ( $ restLocations , $ request -> getPathInfo ( ) ) , array ( 'locationId' => $ contentInfo -> mainLocationId ) ) ; }
Loads all locations for content object.

@param mixed $contentId

@return \eZ\Publish\Core\REST\Server\Values\LocationList
Loads all locations for content object .