public function add($name)
    {
        $this->repository->setCurrentUser($this->repository->getUserService()->loadUser($this->adminID));
        $contentTypeService = $this->repository->getContentTypeService();

        $contentTypeGroupStruct = $contentTypeService->newContentTypeGroupCreateStruct($name);

        try {
            $contentTypeGroup = $contentTypeService->createContentTypeGroup($contentTypeGroupStruct);
            return $contentTypeGroup;
        } catch (UnauthorizedException $e) {
            throw new \RuntimeException($e->getMessage());
        } catch (InvalidArgumentException $e) {
            throw new \RuntimeException($e->getMessage());
        }
    }
public function add($name)
    {
        $this->repository->setCurrentUser($this->repository->getUserService()->loadUser($this->adminID));
        $contentTypeService = $this->repository->getContentTypeService();

        $contentTypeGroupStruct = $contentTypeService->newContentTypeGroupCreateStruct($name);

        try {
            $contentTypeGroup = $contentTypeService->createContentTypeGroup($contentTypeGroupStruct);
            return $contentTypeGroup;
        } catch (UnauthorizedException $e) {
            throw new \RuntimeException($e->getMessage());
        } catch (InvalidArgumentException $e) {
            throw new \RuntimeException($e->getMessage());
        }
    }
public function add ( $ name ) { $ this -> repository -> setCurrentUser ( $ this -> repository -> getUserService ( ) -> loadUser ( $ this -> adminID ) ) ; $ contentTypeService = $ this -> repository -> getContentTypeService ( ) ; $ contentTypeGroupStruct = $ contentTypeService -> newContentTypeGroupCreateStruct ( $ name ) ; try { $ contentTypeGroup = $ contentTypeService -> createContentTypeGroup ( $ contentTypeGroupStruct ) ; return $ contentTypeGroup ; } catch ( UnauthorizedException $ e ) { throw new \ RuntimeException ( $ e -> getMessage ( ) ) ; } catch ( InvalidArgumentException $ e ) { throw new \ RuntimeException ( $ e -> getMessage ( ) ) ; } }
Create eZ ContentTypeGroup

@param string $name ContentTypeGroup name
@return \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup|RuntimeException
Create eZ ContentTypeGroup