public function loadLocationChildren($locationPath, Request $request)
{
$offset = $request->query->has('offset') ? (int) $request->query->get('offset') : 0;
$limit = $request->query->has('limit') ? (int) $request->query->get('limit') : 10;
$restLocations = array();
$locationId = $this->extractLocationIdFromPath($locationPath);
$children = $this->locationService->loadLocationChildren($this->locationService->loadLocation($locationId), $offset >= 0 ? $offset : 0, $limit >= 0 ? $limit : 25)->locations;
foreach ($children as $location) {
$restLocations[] = new Values\RestLocation($location, $this->locationService->getLocationChildCount($location));
}
return new Values\CachedValue(new Values\LocationList($restLocations, $request->getPathInfo()), array('locationId' => $locationId));
}