protected function buildDomainUserGroupObject(APIContent $content)
    {
        $locationService = $this->repository->getLocationService();

        if ($content->getVersionInfo()->getContentInfo()->mainLocationId !== null) {
            $mainLocation = $locationService->loadLocation(
                $content->getVersionInfo()->getContentInfo()->mainLocationId
            );
            $parentLocation = $locationService->loadLocation($mainLocation->parentLocationId);
        }

        return new UserGroup(
            array(
                'content' => $content,
                'parentId' => isset($parentLocation) ? $parentLocation->contentId : null,
            )
        );
    }
protected function buildDomainUserGroupObject(APIContent $content)
    {
        $locationService = $this->repository->getLocationService();

        if ($content->getVersionInfo()->getContentInfo()->mainLocationId !== null) {
            $mainLocation = $locationService->loadLocation(
                $content->getVersionInfo()->getContentInfo()->mainLocationId
            );
            $parentLocation = $locationService->loadLocation($mainLocation->parentLocationId);
        }

        return new UserGroup(
            array(
                'content' => $content,
                'parentId' => isset($parentLocation) ? $parentLocation->contentId : null,
            )
        );
    }
protected function buildDomainUserGroupObject ( APIContent $ content ) { $ locationService = $ this -> repository -> getLocationService ( ) ; if ( $ content -> getVersionInfo ( ) -> getContentInfo ( ) -> mainLocationId !== null ) { $ mainLocation = $ locationService -> loadLocation ( $ content -> getVersionInfo ( ) -> getContentInfo ( ) -> mainLocationId ) ; $ parentLocation = $ locationService -> loadLocation ( $ mainLocation -> parentLocationId ) ; } return new UserGroup ( array ( 'content' => $ content , 'parentId' => isset ( $ parentLocation ) ? $ parentLocation -> contentId : null , ) ) ; }
Builds the domain UserGroup object from provided Content object.

@param \eZ\Publish\API\Repository\Values\Content\Content $content

@return \eZ\Publish\API\Repository\Values\User\UserGroup
Builds the domain UserGroup object from provided Content object .