public function listar($ordem = "ASC", $campo = self::ID) { $info = parent::listar($ordem, $campo); if (!empty($info)) { parent::resgatarObjetos($info); $temp = new ProdutoCategoria($info[self::ID]); $temp->nome = $info[self::NOME]; $temp->ordem = $info[self::ORDEM]; $temp->disponivel = $info[self::DISPONIVEL] == self::VALOR_DISPONIVEL_TRUE ? true : false; $temp->visaoUnica = $info[self::VISAOUNICA] == self::VALOR_VISAOUNICA_TRUE ? true : false; $temp->descricaoPequena = $info[self::DESCRICAOPEQUENA]; $temp->descricao = $info[self::DESCRICAO]; $temp->subreferencia = $info[self::SUBREFERENCIA]; if (!empty($info[self::IMAGEM])) { $temp->setImagem(new Image(new Arquivos(Sistema::$caminhoURL . Sistema::$caminhoDataProdutoCategorias . $info[self::IMAGEM]))); } $temp->setURL($info[parent::URL]); $temp->setIdCategoriaPai($info[self::CATEGORIAPAI]); return $temp; } }