docs: public CmsResource createNewElement(CmsObject userCms, CmsResource modelResource, String pageFolderRootPath)
      throws CmsException {
  
          checkOffline(userCms);
          checkInitialized();
          CmsObject rootCms = rootCms(userCms);
          String folderPath = getFolderPath(userCms, pageFolderRootPath);
          CmsVfsUtil.createFolder(userCms, folderPath);
          String destination = CmsStringUtil.joinPaths(folderPath, getNamePattern(true));
          String creationPath = OpenCms.getResourceManager().getNameGenerator().getNewFileName(rootCms, destination, 5);
          // set the content locale
          rootCms.getRequestContext().setAttribute(
              CmsRequestContext.ATTRIBUTE_NEW_RESOURCE_LOCALE,
              userCms.getRequestContext().getLocale());
          if (modelResource != null) {
              // set the model resource
              rootCms.getRequestContext().setAttribute(CmsRequestContext.ATTRIBUTE_MODEL, modelResource.getRootPath());
          }
          CmsResource createdResource = rootCms.createResource(
              creationPath,
              getType(),
              null,
              new ArrayList<CmsProperty>(0));
          if (modelResource != null) {
              // set the model resource
              CmsCategoryService.getInstance().copyCategories(rootCms, modelResource, creationPath);
          }
          try {
              rootCms.unlockResource(creationPath);
          } catch (CmsLockException e) {
              // probably the parent folder is locked
              LOG.info(e.getLocalizedMessage(), e);
          }
          return createdResource;
      }