system/modules/DocumentManagementSystem/classes/DmsLoader.php
private function buildCategory($objCategory)
  {
    $category = new \Category($objCategory->id, $objCategory->name);
    $category->parentCategoryId = $objCategory->pid;
    $category->description = $objCategory->description;
    $category->fileTypes = $objCategory->file_types;
    $category->fileTypesInherit = $objCategory->file_types_inherit;
    $category->publishDocumentsPerDefault = $objCategory->publish_documents_per_default;
    $category->generalReadPermission = $objCategory->general_read_permission;
    $category->generalManagePermission = $objCategory->general_manage_permission;
    $category->cssId = $objCategory->cssID;
    $category->published = $objCategory->published;
    $category->publicationStart = $objCategory->start;
    $category->publicationStop = $objCategory->stop;
    
    // HOOK: modify the category
    if (isset($GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory']) && is_array($GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory']))
    {
      foreach ($GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory'] as $callback)
      {
        $this->import($callback[0]);
        $category = $this->{$callback[0]}->{$callback[1]}($category, $objCategory);
      }
    }
    
    return $category;
  }
private function buildCategory($objCategory)
  {
    $category = new \Category($objCategory->id, $objCategory->name);
    $category->parentCategoryId = $objCategory->pid;
    $category->description = $objCategory->description;
    $category->fileTypes = $objCategory->file_types;
    $category->fileTypesInherit = $objCategory->file_types_inherit;
    $category->publishDocumentsPerDefault = $objCategory->publish_documents_per_default;
    $category->generalReadPermission = $objCategory->general_read_permission;
    $category->generalManagePermission = $objCategory->general_manage_permission;
    $category->cssId = $objCategory->cssID;
    $category->published = $objCategory->published;
    $category->publicationStart = $objCategory->start;
    $category->publicationStop = $objCategory->stop;
    
    // HOOK: modify the category
    if (isset($GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory']) && is_array($GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory']))
    {
      foreach ($GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory'] as $callback)
      {
        $this->import($callback[0]);
        $category = $this->{$callback[0]}->{$callback[1]}($category, $objCategory);
      }
    }
    
    return $category;
  }
private function buildCategory ( $ objCategory ) { $ category = new \ Category ( $ objCategory -> id , $ objCategory -> name ) ; $ category -> parentCategoryId = $ objCategory -> pid ; $ category -> description = $ objCategory -> description ; $ category -> fileTypes = $ objCategory -> file_types ; $ category -> fileTypesInherit = $ objCategory -> file_types_inherit ; $ category -> publishDocumentsPerDefault = $ objCategory -> publish_documents_per_default ; $ category -> generalReadPermission = $ objCategory -> general_read_permission ; $ category -> generalManagePermission = $ objCategory -> general_manage_permission ; $ category -> cssId = $ objCategory -> cssID ; $ category -> published = $ objCategory -> published ; $ category -> publicationStart = $ objCategory -> start ; $ category -> publicationStop = $ objCategory -> stop ; // HOOK: modify the category if ( isset ( $ GLOBALS [ 'TL_HOOKS' ] [ 'dmsModifyLoadedCategory' ] ) && is_array ( $ GLOBALS [ 'TL_HOOKS' ] [ 'dmsModifyLoadedCategory' ] ) ) { foreach ( $ GLOBALS [ 'TL_HOOKS' ] [ 'dmsModifyLoadedCategory' ] as $ callback ) { $ this -> import ( $ callback [ 0 ] ) ; $ category = $ this -> { $ callback [ 0 ] } -> { $ callback [ 1 ] } ( $ category , $ objCategory ) ; } } return $ category ; }
Builds a category from a database result.

@param  DatabaseResult  $objCategory  The database result.
@return  category  The created category.
Builds a category from a database result .