code: protected void sort(List<CmsTreeItem> items, SortParams sort) {
  
          int sortParam = -1;
          boolean ascending = true;
          switch (sort) {
              case tree:
                  m_quickSearch.setFormValueAsString("");
                  m_listView = false;
                  updateContentTree();
                  break;
              case title_asc:
                  sortParam = 0;
                  break;
              case title_desc:
                  sortParam = 0;
                  ascending = false;
                  break;
              case path_asc:
                  sortParam = 1;
                  break;
              case path_desc:
                  sortParam = 1;
                  ascending = false;
                  break;
              default:
                  break;
          }
          if (sortParam != -1) {
              m_listView = true;
              items = getFilteredCategories(hasQuickFilter() ? m_quickSearch.getFormValueAsString() : null);
              Collections.sort(items, new CmsListItemDataComparator(sortParam, ascending));
              updateContentList(items);
          }
      }
docs: Sorts a list of tree items according to the sort parameter.<p>
  
  @param items the items to sort
  @param sort the sort parameter