code: private List<CmsCategoryBean> getFilteredCategories(String filter) {
  
          List<CmsCategoryBean> result;
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(filter)) {
              result = new ArrayList<CmsCategoryBean>();
              for (CmsCategoryBean category : getCategoryList()) {
                  if (category.matchesFilter(filter)) {
                      result.add(category);
                  }
              }
          } else {
              result = getCategoryList();
          }
          return result;
      }
docs: Gets the filtered list of categories.<p>
  
  @param filter the search string to use for filtering
  
  @return the filtered category beans