public loadLocationsForContent ( mixed $contentId, |
||
$contentId | mixed | |
$request | ||
Résultat |
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, $this->locationService->getLocationChildCount($location));
}
return new Values\CachedValue(new Values\LocationList($restLocations, $request->getPathInfo()), array('locationId' => $contentInfo->mainLocationId));
}