public function loadUserGroup($groupPath)
    {
        $userGroupLocation = $this->locationService->loadLocation(
            $this->extractLocationIdFromPath($groupPath)
        );

        if (trim($userGroupLocation->pathString, '/') != $groupPath) {
            throw new NotFoundException(
                "Could not find location with path string $groupPath"
            );
        }

        $userGroup = $this->userService->loadUserGroup(
            $userGroupLocation->contentId,
            Language::ALL
        );
        $userGroupContentInfo = $userGroup->getVersionInfo()->getContentInfo();
        $contentType = $this->contentTypeService->loadContentType($userGroupContentInfo->contentTypeId);

        return new Values\CachedValue(
            new Values\RestUserGroup(
                $userGroup,
                $contentType,
                $userGroupContentInfo,
                $userGroupLocation,
                $this->contentService->loadRelations($userGroup->getVersionInfo())
            ),
            array('locationId' => $userGroupLocation->id)
        );
    }
public function loadUserGroup($groupPath)
    {
        $userGroupLocation = $this->locationService->loadLocation(
            $this->extractLocationIdFromPath($groupPath)
        );

        if (trim($userGroupLocation->pathString, '/') != $groupPath) {
            throw new NotFoundException(
                "Could not find location with path string $groupPath"
            );
        }

        $userGroup = $this->userService->loadUserGroup(
            $userGroupLocation->contentId,
            Language::ALL
        );
        $userGroupContentInfo = $userGroup->getVersionInfo()->getContentInfo();
        $contentType = $this->contentTypeService->loadContentType($userGroupContentInfo->contentTypeId);

        return new Values\CachedValue(
            new Values\RestUserGroup(
                $userGroup,
                $contentType,
                $userGroupContentInfo,
                $userGroupLocation,
                $this->contentService->loadRelations($userGroup->getVersionInfo())
            ),
            array('locationId' => $userGroupLocation->id)
        );
    }
public function loadUserGroup ( $ groupPath ) { $ userGroupLocation = $ this -> locationService -> loadLocation ( $ this -> extractLocationIdFromPath ( $ groupPath ) ) ; if ( trim ( $ userGroupLocation -> pathString , '/' ) != $ groupPath ) { throw new NotFoundException ( "Could not find location with path string $groupPath" ) ; } $ userGroup = $ this -> userService -> loadUserGroup ( $ userGroupLocation -> contentId , Language :: ALL ) ; $ userGroupContentInfo = $ userGroup -> getVersionInfo ( ) -> getContentInfo ( ) ; $ contentType = $ this -> contentTypeService -> loadContentType ( $ userGroupContentInfo -> contentTypeId ) ; return new Values \ CachedValue ( new Values \ RestUserGroup ( $ userGroup , $ contentType , $ userGroupContentInfo , $ userGroupLocation , $ this -> contentService -> loadRelations ( $ userGroup -> getVersionInfo ( ) ) ) , array ( 'locationId' => $ userGroupLocation -> id ) ) ; }
Loads a user group for the given path.

@param $groupPath

@return \eZ\Publish\Core\REST\Server\Values\RestUserGroup
Loads a user group for the given path .