public function loadUserGroup( $id )
    {
        /** @var \eZ\Publish\API\Repository\Repository $repository */
        $repository = $this->getRepository();
        $userService = $repository->getUserService();

        $userGroup = $repository->sudo(
            function() use( $id, $userService )
            {
                return $userService->loadUserGroup( $id );
            }
        );

        return $userGroup;
    }
public function loadUserGroup( $id )
    {
        /** @var \eZ\Publish\API\Repository\Repository $repository */
        $repository = $this->getRepository();
        $userService = $repository->getUserService();

        $userGroup = $repository->sudo(
            function() use( $id, $userService )
            {
                return $userService->loadUserGroup( $id );
            }
        );

        return $userGroup;
    }
public function loadUserGroup ( $ id ) { /** @var \eZ\Publish\API\Repository\Repository $repository */ $ repository = $ this -> getRepository ( ) ; $ userService = $ repository -> getUserService ( ) ; $ userGroup = $ repository -> sudo ( function ( ) use ( $ id , $ userService ) { return $ userService -> loadUserGroup ( $ id ) ; } ) ; return $ userGroup ; }
Load a User Group by id

@param int $id User Group content identifier

@return \eZ\Publish\API\Repository\Values\User\UserGroup
Load a User Group by id