<?php

class Model_Bibliotecas_Categoria extends Pampa_Db_Row {

  public function getArquivos()
  {
    $modelLinks = new Model_Bibliotecas_Categorias_Arquivos();
    $links = $modelLinks->getByCategoriaId($this->id);

    return $links;
  }

  public function getTotalItems($userId){
    $modelLinks = new Model_Cms_System_Modules();
    $links = $modelLinks->findFromCategory($this->id, $userId)->count();
    return $links;
  }

}