docs: public List<CmsResource> getGalleryItems() {
  
          if (m_galleryItems == null) {
              // gallery items have not been read yet
              int resTypeId = getGalleryItemsTypeId();
              if (CmsStringUtil.isNotEmpty(getParamGalleryPath())) {
                  try {
                      // set last used gallery in settings to current gallery
                      getSettings().setLastUsedGallery("" + getGalleryTypeId(), getParamGalleryPath());
                      CmsResourceFilter filter;
                      if (resTypeId == -1) {
                          // filter all resources that are files
                          filter = CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireTimerange().addRequireFile();
                      } else {
                          // filter all resources of the required type
                          filter = CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireTimerange().addRequireType(
                              resTypeId);
                      }
                      m_galleryItems = getCms().readResources(getParamGalleryPath(), filter, false);
                  } catch (CmsException e) {
                      // error reading resources
                      LOG.error(e.getLocalizedMessage(), e);
                  } catch (NullPointerException e) {
                      // ignore this exception
                  }
              }
          }
          return m_galleryItems;
      }