public function loadCategory($categoryId, \DmsLoaderParams $params)
  {
    $objCategory = $this->Database->prepare("SELECT * FROM tl_dms_categories WHERE id = ?")
                    ->limit(1)
                    ->execute($categoryId);
    
    $category = null;
    if ($objCategory->numRows)
    {
      $category = $this->buildCategory($objCategory);
      if ($params->loadAccessRights)
      {
        $category->accessRights = $this->getAccessRights($category, $params);
      }
      if ($params->loadDocuments)
      {
        $category->documents = $this->getDocuments($category, $params);
      }
      if ($params->loadRootCategory)
      {
        $category->parentCategory = $this->loadCategory($category->parentCategoryId, $params);
      }
    }

    return $category;
  }