code: private void addGalleryEntries(CmsGalleryTreeItem parent, List<CmsGalleryFolderEntry> galleries) {
  
          for (CmsGalleryFolderEntry galleryFolder : galleries) {
              CmsGalleryTreeItem folderItem = createGalleryFolderItem(galleryFolder);
              parent.addChild(folderItem);
              m_galleryTreeItems.put(galleryFolder.getStructureId(), folderItem);
              addGalleryEntries(folderItem, galleryFolder.getSubGalleries());
          }
      }
docs: Adds the gallery tree items to the parent.<p>
  
  @param parent the parent item
  @param galleries the gallery folder entries