system/modules/DocumentManagementSystem/classes/DmsLoader.php
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;
  }
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;
  }
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 ; }
Load the category with the given id.

@param  int    $categoryId  The id of the category to load.
@param  DmsLoaderParams  $params  The configured params to use while loading.
@return  category  Returns the category.
Load the category with the given id .