original_string: 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());
          }
      }
code: 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());
          }
      }
code_tokens: 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 ( ) ) ; } }
docstring: Create eZ ContentTypeGroup
  
  @param string $name ContentTypeGroup name
  @return \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup|RuntimeException
docstring_tokens: Create eZ ContentTypeGroup